Redefine the removed __dev* for now

The __dev* directives and functions were removed in 3.8, as they
are no-ops. We still have use of them for older versions, thus
we should define them (as noops) if they don't exist.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
build_tools/make_version: If making from a tag show only the tag in the version.

Also, if there is no other version information use the directory name. Downloads
from gitweb will include the sha information in the build and otherwise a user
could locate the source directory via the embedded version information. I
believe this is better than an empty string.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
(cherry picked from commit 37371f19e97e5af645082fcafa42d9e18ef574e5)
build_tools/make_version: Strip off the leading 'v' in the version string.

Quote: "It's a change. People hate change"

Make the version string say something like 2.6.2 instead of v2.6.2.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
(cherry picked from commit 9b0d19c05449071c40827efbb0b0a5b302da435f)
build_tools/make_version: Only strip 'v' if followed by a digit.

Do not want to accidentally change the tag "very_cool" to "ery_cool".

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
(cherry picked from commit 7714d5d94e3cb6d3ff5e9eceaee5b131a43b0ce8)
Kbuild: Fix OSLEC build error

Fixes up the kbuild to work with compiling OSLEC from the kernel source. See
HOWTO here: http://forums.digium.com/viewtopic.php?t=67164

Internal-Issue-ID: DAHLIN-317
Reported-By: Vladimir Mikhelson
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
(cherry picked from commit f09daed735f1be091fe9f177f675d0c87ad65900)
wct4xxp: Ensure all spans are configured by default.

Not configuring all the spans on an octal card can result in some of the
spans not working in clear channel modes.

Now ensure that all spans receive a default configuration regardless how
they are configured from user space.

Internal-Issue-ID: DAHLIN-289
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10728 a0bf4364-ded3-4de4-8d8a-66a801d63aff
wct4xxp: Companding on VPM needs to be changed when switching linemodes.

If a user switches linemode with sysfs, the VPM would never switch the
companding mode to alaw, and the result would be extreme static on all channels
of the span when the VPM is enabeld.

Now if the deflaw of the span has changed when an echocan is created, the
companding mode of the VPM channel is changed.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Conflicts:
	drivers/dahdi/wct4xxp/base.c
wctdm24xxp: Fix FXO failure to detect battery CO disconnects.

In 2.6.2 I introduced an error in (41639330a "wctdm24xxp: Eliminate chance for
channel to be stuck in RED alarm.") which would get an FXO stuck in detecting an
ONHOOK event from the remote side.  An FXO port could go into the
BATTERY_DEBOUNCING_LOST_ALARM state and then back to the BATTERY_PRESENT state
without sending the dahdi_hooksig up to Asterisk.  Therefore, Asterisk would
never detect the state changes needed for a remote side disconnect.

This change adds two more states, BATTERY_DEBOUNCING_PRESENT_FROM_LOST_ALARM and
BATTERY_DEBOUNCING_LOST_FROM_PRESENT_ALARM so that the state machine does not
miss any needed transitions when going back to BATTERY_PRESENT or BATTERY_LOST
regardless of why the debounce was started.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
(cherry picked from commit 244f621eb1c315725056635903e8a0180ebd0568)