[dahdi-commits] tzafrir: linux/trunk r10472 - in /linux/trunk: drivers/dahdi/ drivers/dahdi/h...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue Mar 13 15:09:18 CDT 2012


Author: tzafrir
Date: Tue Mar 13 15:09:12 2012
New Revision: 10472

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10472
Log:
Remove support for kernels < 2.6.18

This patch removes support for kernel versions < 2.6.18, as those are
not actively supported in any major Linux distribution (except RHEL4,
which is in the "extended" support level of the product life cycle).

This removes much of the more #ifdef-rich parts of the code.

Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-by: Acked-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c
    linux/trunk/drivers/dahdi/dahdi-sysfs-chan.c
    linux/trunk/drivers/dahdi/dahdi-sysfs.c
    linux/trunk/drivers/dahdi/dahdi-sysfs.h
    linux/trunk/drivers/dahdi/dahdi_dynamic.c
    linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c
    linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c
    linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c
    linux/trunk/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c
    linux/trunk/drivers/dahdi/wcb4xxp/base.c
    linux/trunk/drivers/dahdi/wct4xxp/base.c
    linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c
    linux/trunk/drivers/dahdi/wctc4xxp/base.c
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c
    linux/trunk/drivers/dahdi/wcte12xp/base.c
    linux/trunk/drivers/dahdi/xpp/card_bri.c
    linux/trunk/drivers/dahdi/xpp/card_echo.c
    linux/trunk/drivers/dahdi/xpp/card_fxo.c
    linux/trunk/drivers/dahdi/xpp/card_fxs.c
    linux/trunk/drivers/dahdi/xpp/card_pri.c
    linux/trunk/drivers/dahdi/xpp/dahdi_debug.c
    linux/trunk/drivers/dahdi/xpp/parport_debug.c
    linux/trunk/drivers/dahdi/xpp/xbus-core.c
    linux/trunk/drivers/dahdi/xpp/xbus-core.h
    linux/trunk/drivers/dahdi/xpp/xbus-pcm.c
    linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c
    linux/trunk/drivers/dahdi/xpp/xdefs.h
    linux/trunk/drivers/dahdi/xpp/xpd.h
    linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
    linux/trunk/drivers/dahdi/xpp/xpp_usb.c
    linux/trunk/include/dahdi/dahdi_config.h
    linux/trunk/include/dahdi/kernel.h

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Tue Mar 13 15:09:12 2012
@@ -49,9 +49,7 @@
 #include <linux/sched.h>
 #include <linux/list.h>
 #include <linux/delay.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
 #include <linux/mutex.h>
-#endif
 
 #if defined(HAVE_UNLOCKED_IOCTL) && defined(CONFIG_BKL)
 #include <linux/smp_lock.h>
@@ -342,12 +340,7 @@
  */
 static inline int tone_zone_put(struct dahdi_zone *z)
 {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
-	kref_put(&z->refcount, tone_zone_release);
-	return 1;
-#else
 	return kref_put(&z->refcount, tone_zone_release);
-#endif
 }
 
 static inline void tone_zone_get(struct dahdi_zone *z)
@@ -549,10 +542,6 @@
 #endif
 
 static u_char defgain[256];
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
-#define __RW_LOCK_UNLOCKED() RW_LOCK_UNLOCKED
-#endif
 
 #define NUM_SIGS	10
 
@@ -1878,10 +1867,6 @@
 	result = register_netdev(dev);
 	if (result != 0)
 		return -EIO;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,14)
-	if (netif_carrier_ok(dev))
-		netif_carrier_off(dev); /* no carrier until DCD goes up */
-#endif
 	return 0;
 }
 
@@ -3162,13 +3147,9 @@
 				return -ENXIO;
 			}
 		}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-		__MOD_INC_USE_COUNT (dahdi_transcode_fops->owner);
-#else
 		if (!try_module_get(dahdi_transcode_fops->owner)) {
 			return -ENXIO;
 		}
-#endif
 		if (dahdi_transcode_fops && dahdi_transcode_fops->open) {
 			return dahdi_transcode_fops->open(inode, file);
 		} else {
@@ -10107,34 +10088,5 @@
 	flush_find_master_work();
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
-char *dahdi_kasprintf(gfp_t gfp, const char *fmt, ...)
-{
-	va_list ap;
-	char *p;
-	char *temp;
-	unsigned int len;
-
-	temp = kmalloc(PAGE_SIZE, GFP_KERNEL);
-	if (!temp)
-		return NULL;
-
-	va_start(ap, fmt);
-	len = vsnprintf(temp, PAGE_SIZE, fmt, ap);
-	va_end(ap);
-
-	p = kzalloc(len + 1, gfp);
-	if (!p) {
-		kfree(temp);
-		return NULL;
-	}
-
-	memcpy(p, temp, len + 1);
-	kfree(temp);
-	return p;
-}
-EXPORT_SYMBOL(dahdi_kasprintf);
-#endif
-
 module_init(dahdi_init);
 module_exit(dahdi_cleanup);

Modified: linux/trunk/drivers/dahdi/dahdi-sysfs-chan.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-sysfs-chan.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-sysfs-chan.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-sysfs-chan.c Tue Mar 13 15:09:12 2012
@@ -1,7 +1,4 @@
 #include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
-#  warning "This module is tested only with 2.6 kernels"
-#endif
 
 #define DAHDI_PRINK_MACROS_USE_debug
 #include <linux/kernel.h>
@@ -17,13 +14,7 @@
 #define DEL_DAHDI_DEV(num) \
 	CLASS_DEV_DESTROY(dahdi_class, MKDEV(DAHDI_MAJOR, num))
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
 static struct class *dahdi_class;
-#else
-static struct class_simple *dahdi_class;
-#define class_create class_simple_create
-#define class_destroy class_simple_destroy
-#endif
 
 int chan_sysfs_create(struct dahdi_chan *chan)
 {

Modified: linux/trunk/drivers/dahdi/dahdi-sysfs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-sysfs.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-sysfs.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-sysfs.c Tue Mar 13 15:09:12 2012
@@ -21,23 +21,6 @@
 {
 	return dev_get_drvdata(dev);
 }
-
-#ifdef OLD_HOTPLUG_SUPPORT
-static int span_hotplug(struct device *dev, char **envp, int envnum,
-		char *buff, int bufsize)
-{
-	struct dahdi_span *span;
-
-	if (!dev)
-		return -ENODEV;
-	span = dev_to_span(dev);
-	envp[0] = buff;
-	if (snprintf(buff, bufsize, "SPAN_NAME=%s", span->name) >= bufsize)
-		return -ENOMEM;
-	envp[1] = NULL;
-	return 0;
-}
-#else
 
 #define	SPAN_VAR_BLOCK	\
 	do {		\
@@ -101,8 +84,6 @@
 }
 
 #endif
-
-#endif	/* OLD_HOTPLUG_SUPPORT */
 
 #define span_attr(field, format_string)				\
 static BUS_ATTR_READER(field##_show, dev, buf)			\
@@ -214,11 +195,7 @@
 static struct bus_type spans_bus_type = {
 	.name           = "dahdi_spans",
 	.match          = span_match,
-#ifdef OLD_HOTPLUG_SUPPORT
-	.hotplug	= span_hotplug,
-#else
 	.uevent         = span_uevent,
-#endif
 	.dev_attrs	= span_dev_attrs,
 	.drv_attrs	= dahdi_attrs,
 };
@@ -246,9 +223,7 @@
 	.bus		= &spans_bus_type,
 	.probe		= span_probe,
 	.remove		= span_remove,
-#ifndef OLD_HOTPLUG_SUPPORT
 	.owner		= THIS_MODULE
-#endif
 };
 
 static void span_uevent_send(struct dahdi_span *span, enum kobject_action act)
@@ -258,26 +233,7 @@
 	kobj = &span->span_device->kobj;
 	span_dbg(DEVICES, span, "SYFS dev_name=%s action=%d\n",
 		dev_name(span->span_device), act);
-
-#if defined(OLD_HOTPLUG_SUPPORT_269)
-	{
-		/* Copy from new kernels lib/kobject_uevent.c */
-		static const char *const str[] = {
-			[KOBJ_ADD]	"add",
-			[KOBJ_REMOVE]	"remove",
-			[KOBJ_CHANGE]	"change",
-			[KOBJ_MOUNT]	"mount",
-			[KOBJ_UMOUNT]	"umount",
-			[KOBJ_OFFLINE]	"offline",
-			[KOBJ_ONLINE]	"online"
-		};
-		kobject_hotplug(str[act], kobj);
-	}
-#elif defined(OLD_HOTPLUG_SUPPORT)
-	kobject_hotplug(kobj, act);
-#else
 	kobject_uevent(kobj, act);
-#endif
 }
 
 static void span_release(struct device *dev)
@@ -372,37 +328,25 @@
 	return container_of(dev, struct dahdi_device, dev);
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static ssize_t dahdi_device_manufacturer_show(struct device *dev, char *buf)
-#else
 static ssize_t
 dahdi_device_manufacturer_show(struct device *dev,
 			       struct device_attribute *attr, char *buf)
-#endif
 {
 	struct dahdi_device *ddev = to_ddev(dev);
 	return sprintf(buf, "%s\n", ddev->manufacturer);
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static ssize_t dahdi_device_type_show(struct device *dev, char *buf)
-#else
 static ssize_t
 dahdi_device_type_show(struct device *dev,
 		       struct device_attribute *attr, char *buf)
-#endif
 {
 	struct dahdi_device *ddev = to_ddev(dev);
 	return sprintf(buf, "%s\n", ddev->devicetype);
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static ssize_t dahdi_device_span_count_show(struct device *dev, char *buf)
-#else
 static ssize_t
 dahdi_device_span_count_show(struct device *dev,
 			     struct device_attribute *attr, char *buf)
-#endif
 {
 	struct dahdi_device *ddev = to_ddev(dev);
 	unsigned int count = 0;
@@ -414,13 +358,9 @@
 	return sprintf(buf, "%d\n", count);
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static ssize_t dahdi_device_hardware_id_show(struct device *dev, char *buf)
-#else
 static ssize_t
 dahdi_device_hardware_id_show(struct device *dev,
 			     struct device_attribute *attr, char *buf)
-#endif
 {
 	struct dahdi_device *ddev = to_ddev(dev);
 
@@ -428,28 +368,18 @@
 		(ddev->hardware_id) ? ddev->hardware_id : "");
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static ssize_t
-dahdi_device_auto_assign(struct device *dev, const char *buf, size_t count)
-#else
 static ssize_t
 dahdi_device_auto_assign(struct device *dev, struct device_attribute *attr,
 			 const char *buf, size_t count)
-#endif
 {
 	struct dahdi_device *ddev = to_ddev(dev);
 	dahdi_assign_device_spans(ddev);
 	return count;
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static ssize_t
-dahdi_device_assign_span(struct device *dev, const char *buf, size_t count)
-#else
 static ssize_t
 dahdi_device_assign_span(struct device *dev, struct device_attribute *attr,
 			 const char *buf, size_t count)
-#endif
 {
 	int ret;
 	struct dahdi_span *span;
@@ -482,14 +412,9 @@
 	return -EINVAL;
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static ssize_t
-dahdi_device_unassign_span(struct device *dev, const char *buf, size_t count)
-#else
 static ssize_t
 dahdi_device_unassign_span(struct device *dev, struct device_attribute *attr,
 			   const char *buf, size_t count)
-#endif
 {
 	int ret;
 	unsigned int local_span_number;
@@ -515,13 +440,9 @@
 	return (ret < 0) ? ret : count;
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static ssize_t dahdi_spantype_show(struct device *dev, char *buf)
-#else
 static ssize_t
 dahdi_spantype_show(struct device *dev,
 		    struct device_attribute *attr, char *buf)
-#endif
 {
 	struct dahdi_device *ddev = to_ddev(dev);
 	int count = 0;
@@ -539,14 +460,9 @@
 	return total;
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static ssize_t
-dahdi_spantype_store(struct device *dev, const char *buf, size_t count)
-#else
 static ssize_t
 dahdi_spantype_store(struct device *dev, struct device_attribute *attr,
 		     const char *buf, size_t count)
-#endif
 {
 	struct dahdi_device *const ddev = to_ddev(dev);
 	int ret;

Modified: linux/trunk/drivers/dahdi/dahdi-sysfs.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-sysfs.h?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-sysfs.h (original)
+++ linux/trunk/drivers/dahdi/dahdi-sysfs.h Tue Mar 13 15:09:12 2012
@@ -1,35 +1,6 @@
 #ifndef	DAHDI_SYSFS_H
 #define	DAHDI_SYSFS_H
 
-/*
- * Very old hotplug support
- */
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 9)
-#define	OLD_HOTPLUG_SUPPORT	/* for older kernels */
-#define	OLD_HOTPLUG_SUPPORT_269
-#endif
-
-#ifdef	OLD_HOTPLUG_SUPPORT_269
-/* Copy from new kernels lib/kobject_uevent.c */
-enum kobject_action {
-	KOBJ_ADD,
-	KOBJ_REMOVE,
-	KOBJ_CHANGE,
-	KOBJ_MOUNT,
-	KOBJ_UMOUNT,
-	KOBJ_OFFLINE,
-	KOBJ_ONLINE,
-};
-#endif
-
-/*
- * Hotplug replaced with uevent in 2.6.16
- */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
-#define	OLD_HOTPLUG_SUPPORT	/* for older kernels */
-#endif
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
 #define	DEVICE_ATTR_READER(name, dev, buf) \
 		ssize_t name(struct device *dev, \
 			struct device_attribute *attr, \
@@ -46,16 +17,6 @@
 		ssize_t name(struct device *dev, \
 			struct device_attribute *attr, \
 			const char *buf, size_t count)
-#else
-#define	DEVICE_ATTR_READER(name, dev, buf)	\
-		ssize_t name(struct device *dev, char *buf)
-#define	DEVICE_ATTR_WRITER(name, dev, buf, count)	\
-		ssize_t name(struct device *dev, const char *buf, size_t count)
-#define BUS_ATTR_READER(name, dev, buf) \
-		ssize_t name(struct device *dev, char *buf)
-#define BUS_ATTR_WRITER(name, dev, buf, count) \
-		ssize_t name(struct device *dev, const char *buf, size_t count)
-#endif
 
 #define	DRIVER_ATTR_READER(name, drv, buf)	\
 		ssize_t name(struct device_driver *drv, char * buf)
@@ -68,15 +29,9 @@
 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
 #define CLASS_DEV_CREATE(class, devt, device, name) \
 	device_create(class, device, devt, name)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
+#else
 #define CLASS_DEV_CREATE(class, devt, device, name) \
 	class_device_create(class, NULL, devt, device, name)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
-#define CLASS_DEV_CREATE(class, devt, device, name) \
-	class_device_create(class, devt, device, name)
-#else
-#define CLASS_DEV_CREATE(class, devt, device, name) \
-	class_simple_device_add(class, devt, device, name)
 #endif
 
 /* Device file destruction macros */
@@ -84,15 +39,9 @@
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
 #define CLASS_DEV_DESTROY(class, devt) \
 	device_destroy(class, devt)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+#else
 #define CLASS_DEV_DESTROY(class, devt) \
 	class_device_destroy(class, devt)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 9)
-#define CLASS_DEV_DESTROY(class, devt) \
-	class_simple_device_remove(devt)
-#else
-#define CLASS_DEV_DESTROY(class, devt) \
-	class_simple_device_remove(class, devt)
 #endif
 
 /* Global */

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic.c Tue Mar 13 15:09:12 2012
@@ -406,12 +406,7 @@
 
 static inline int dynamic_put(struct dahdi_dynamic *d)
 {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
-	kref_put(&d->kref, dahdi_dynamic_release);
-	return 1;
-#else
 	return kref_put(&d->kref, dahdi_dynamic_release);
-#endif
 }
 
 static inline void dynamic_get(struct dahdi_dynamic *d)

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c Tue Mar 13 15:09:12 2012
@@ -74,11 +74,7 @@
 	return span;
 }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
 static int ztdeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
-#else
-static int ztdeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
-#endif
 {
 	struct dahdi_span *span;
 	struct ztdeth_header *zh;
@@ -87,11 +83,7 @@
 #else
 	zh = (struct ztdeth_header *)skb->nh.raw;
 #endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
 	span = ztdeth_getspan(eth_hdr(skb)->h_source, zh->subaddr);
-#else
-	span = ztdeth_getspan(skb->mac.ethernet->h_source, zh->subaddr);
-#endif	
 	if (span) {
 		skb_pull(skb, sizeof(struct ztdeth_header));
 #ifdef NEW_SKB_LINEARIZE

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c Tue Mar 13 15:09:12 2012
@@ -224,13 +224,8 @@
 /**
  * Ethernet receiving side processing function.
  */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
 static int ztdethmf_rcv(struct sk_buff *skb, struct net_device *dev,
 		struct packet_type *pt, struct net_device *orig_dev)
-#else
-static int ztdethmf_rcv(struct sk_buff *skb, struct net_device *dev,
-		struct packet_type *pt)
-#endif
 {
 	int num_spans = 0, span_index = 0;
 	unsigned char *data;
@@ -267,13 +262,8 @@
 
 		rcu_read_lock();
 		do {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 9)
 			find_ethmf(eth_hdr(skb)->h_source,
 				htons(span_index), &z, &span);
-#else
-			find_ethmf(skb->mac.ethernet->h_source,
-				htons(span_index), &z, &span);
-#endif
 			if (unlikely(!z || !span)) {
 				/* The recv'd span does not belong to us */
 				/* ethmf_errors_inc(); */
@@ -396,10 +386,6 @@
 	struct net_device *dev;
 	unsigned char addr[ETH_ALEN];
 	int spans_ready = 0, index = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
-	static DEFINE_SPINLOCK(lock);
-	unsigned long flags;
-#endif
 
 	if (atomic_read(&shutdown))
 		return;
@@ -411,24 +397,12 @@
 		return;
 	}
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
-	if (!atomic_read(&z->ready)) {
-		spin_lock_irqsave(&lock, flags);
-		atomic_inc(&z->ready);
-		if (1 == atomic_read(&z->ready)) {
-			memcpy(z->msgbuf, msg, msglen);
-			z->msgbuf_len = msglen;
-		}
-		spin_unlock_irqrestore(&lock, flags);
-	}
-#else
 	if (!atomic_read(&z->ready)) {
 		if (atomic_inc_return(&z->ready) == 1) {
 			memcpy(z->msgbuf, msg, msglen);
 			z->msgbuf_len = msglen;
 		}
 	}
-#endif
 
 	spans_ready = ethmf_trx_spans_ready(z->addr_hash, &ready_spans);
 	if (spans_ready) {

Modified: linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c (original)
+++ linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c Tue Mar 13 15:09:12 2012
@@ -72,18 +72,9 @@
 	int res;
 	va_list args;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
 	va_start(args, format);
 	res = vprintk(format, args);
 	va_end(args);
-#else
-	char buf[256];
-
-	va_start(args, format);
-	res = vsnprintf(buf, sizeof(buf), format, args);
-	va_end(args);
-	printk(KERN_INFO "%s" buf);
-#endif
 
 	return res;
 }

Modified: linux/trunk/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c (original)
+++ linux/trunk/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c Tue Mar 13 15:09:12 2012
@@ -38,18 +38,9 @@
 	int res;
 	va_list args;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 9)
 	va_start(args, format);
 	res = vprintk(format, args);
 	va_end(args);
-#else
-	char buf[256];
-
-	va_start(args, format);
-	res = vsnprintf(buf, sizeof(buf), format, args);
-	va_end(args);
-	printk(KERN_INFO "%s" buf);
-#endif
 
 	return res;
 }

Modified: linux/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcb4xxp/base.c Tue Mar 13 15:09:12 2012
@@ -1198,7 +1198,6 @@
 		return src;
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18))
 static ssize_t b4_timing_master_show(struct device *dev,
 				     struct device_attribute *attr,
 				     char *buf)
@@ -1225,13 +1224,6 @@
 	device_remove_file(&b4->pdev->dev,
 			   &dev_attr_timing_master);
 }
-
-#else
-
-static inline void create_sysfs_files(struct b4xxp *b4) { return; }
-static inline void remove_sysfs_files(struct b4xxp *b4) { return; }
-
-#endif /* LINUX_KERNEL > 2.6.18 */
 
 /*
  * allocates memory and pretty-prints a given S/T state engine state to it.

Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Tue Mar 13 15:09:12 2012
@@ -119,11 +119,7 @@
  */
 struct workqueue_struct {
 	/* TODO: Find out exactly where the API changed */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
 	struct cpu_workqueue_struct *cpu_wq;
-#else
-	struct cpu_workqueue_struct cpu_wq[NR_CPUS];
-#endif
 	const char *name;
 	struct list_head list; 	/* Empty if single thread */
 };
@@ -2400,7 +2396,6 @@
 	__t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18))
 static ssize_t t4_timing_master_show(struct device *dev,
 				     struct device_attribute *attr,
 				     char *buf)
@@ -2430,13 +2425,6 @@
 	device_remove_file(&wc->dev->dev,
 			   &dev_attr_timing_master);
 }
-
-#else
-
-static inline void create_sysfs_files(struct t4 *wc) { return; }
-static inline void remove_sysfs_files(struct t4 *wc) { return; }
-
-#endif /* LINUX_KERNEL > 2.6.18 */
 
 static inline void __t4_update_timing(struct t4 *wc)
 {
@@ -4617,12 +4605,6 @@
 	const u32 BASE_ADDRESS = 0x00080000;
 	const u8 *data, *end;
 	size_t size = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
-	u32 *pci_state;
-	pci_state = kzalloc(64 * sizeof(u32), GFP_KERNEL);
-	if (!pci_state)
-		return -ENOMEM;
-#endif
 
 	/* Erase flash */
 	erase_half(wc);
@@ -4647,11 +4629,7 @@
 
 	/* Reset te820 fpga after loading firmware */
 	dev_info(&wc->dev->dev, "Firmware load complete. Reseting device.\n");
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
-	res = pci_save_state(wc->dev, pci_state);
-#else
 	res = pci_save_state(wc->dev);
-#endif
 	if (res)
 		goto error_exit;
 	/* Set the fpga reset bits and clobber the remainder of the
@@ -4659,11 +4637,7 @@
 	t4_pci_out(wc, WC_LEDS, 0xe0000000);
 	msleep(1000);
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
-	pci_restore_state(wc->dev, pci_state);
-#else
 	pci_restore_state(wc->dev);
-#endif
 
 	/* Signal the driver to restart initialization.
 	 * This will back out all initialization so far and
@@ -4671,9 +4645,6 @@
 	return -EAGAIN;
 
 error_exit:
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
-	kfree(pci_state);
-#endif
 	return res;
 }
 
@@ -5383,13 +5354,11 @@
 	{ 0, }
 };
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
 static void _t4_shutdown(struct pci_dev *pdev)
 {
 	struct t4 *wc = pci_get_drvdata(pdev);
 	t4_hardware_stop(wc);
 }
-#endif
 
 static int t4_suspend(struct pci_dev *pdev, pm_message_t state)
 {
@@ -5400,9 +5369,7 @@
 	.name = "wct4xxp",
 	.probe = t4_init_one_retry,
 	.remove = __devexit_p(t4_remove_one),
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
 	.shutdown = _t4_shutdown,
-#endif
 	.suspend = t4_suspend,
 	.id_table = t4_pci_tbl,
 };

Modified: linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c Tue Mar 13 15:09:12 2012
@@ -27,10 +27,6 @@
 
 #include "vpm450m.h"
 #include "oct6100api/oct6100_api.h"
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
-#include <linux/config.h>
-#endif
 
 /* API for Octasic access */
 UINT32 Oct6100UserGetTime(tPOCT6100_GET_TIME f_pTime)

Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Tue Mar 13 15:09:12 2012
@@ -42,11 +42,7 @@
 
 #include "dahdi/kernel.h"
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
-#include <asm/io.h>
-#else
 #include <linux/io.h>
-#endif
 
 /* COMPILE TIME OPTIONS =================================================== */
 
@@ -72,13 +68,6 @@
 	if ((debug & _dbgmask) == (_dbgmask)) {				\
 		dev_info(&(wc)->pdev->dev, _fmt, ## _args);		\
 	}								\
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
-/* also added in RHEL kernels with the OpenInfiniband backport: */
-#if LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 9) || !defined(DEFINE_SPINLOCK)
-typedef	unsigned gfp_t;		/* Added in 2.6.14 */
-#endif
-#endif
 
 
 /* define CONFIG_WCTC4XXP_POLLING to operate in a pure polling mode.  This is

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Tue Mar 13 15:09:12 2012
@@ -6051,13 +6051,11 @@
 	{ 0 }
 };
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
 static void wctdm_shutdown(struct pci_dev *pdev)
 {
 	struct wctdm *wc = pci_get_drvdata(pdev);
 	voicebus_quiesce(&wc->vb);
 }
-#endif
 
 MODULE_DEVICE_TABLE(pci, wctdm_pci_tbl);
 
@@ -6070,9 +6068,7 @@
 	.name = "wctdm24xxp",
 	.probe = wctdm_init_one,
 	.remove = __devexit_p(wctdm_remove_one),
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
 	.shutdown = wctdm_shutdown,
-#endif
 	.suspend = wctdm_suspend,
 	.id_table = wctdm_pci_tbl,
 };

Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Tue Mar 13 15:09:12 2012
@@ -2697,13 +2697,7 @@
 	spin_lock_init(&wc->reglock);
 	INIT_LIST_HEAD(&wc->active_cmds);
 	INIT_LIST_HEAD(&wc->pending_cmds);
-#	if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
-	wc->timer.function = te12xp_timer;
-	wc->timer.data = (unsigned long)wc;
-	init_timer(&wc->timer);
-#	else
 	setup_timer(&wc->timer, te12xp_timer, (unsigned long)wc);
-#	endif
 
 #	if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
 	INIT_WORK(&wc->timer_work, timer_work_func, wc);
@@ -2876,13 +2870,11 @@
 	{ 0 }
 };
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
 static void te12xp_shutdown(struct pci_dev *pdev)
 {
 	struct t1 *wc = pci_get_drvdata(pdev);
 	voicebus_quiesce(&wc->vb);
 }
-#endif
 
 static int te12xp_suspend(struct pci_dev *pdev, pm_message_t state)
 {
@@ -2895,9 +2887,7 @@
 	.name = "wcte12xp",
 	.probe = te12xp_init_one,
 	.remove = __devexit_p(te12xp_remove_one),
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
 	.shutdown = te12xp_shutdown,
-#endif
 	.suspend = te12xp_suspend,
 	.id_table = te12xp_pci_tbl,
 };

Modified: linux/trunk/drivers/dahdi/xpp/card_bri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_bri.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_bri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_bri.c Tue Mar 13 15:09:12 2012
@@ -1743,9 +1743,7 @@
 	.type = XPD_TYPE_BRI,
 	.driver = {
 		   .name = "bri",
-#ifndef OLD_HOTPLUG_SUPPORT
 		   .owner = THIS_MODULE,
-#endif
 		   .probe = bri_xpd_probe,
 		   .remove = bri_xpd_remove}
 };

Modified: linux/trunk/drivers/dahdi/xpp/card_echo.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_echo.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_echo.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_echo.c Tue Mar 13 15:09:12 2012
@@ -329,9 +329,7 @@
 	.type = XPD_TYPE_ECHO,
 	.driver = {
 		   .name = "echo",
-#ifndef OLD_HOTPLUG_SUPPORT
 		   .owner = THIS_MODULE,
-#endif
 		   .probe = echo_xpd_probe,
 		   .remove = echo_xpd_remove}
 };

Modified: linux/trunk/drivers/dahdi/xpp/card_fxo.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxo.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxo.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxo.c Tue Mar 13 15:09:12 2012
@@ -1481,9 +1481,7 @@
 	.type = XPD_TYPE_FXO,
 	.driver = {
 		   .name = "fxo",
-#ifndef OLD_HOTPLUG_SUPPORT
 		   .owner = THIS_MODULE,
-#endif
 		   .probe = fxo_xpd_probe,
 		   .remove = fxo_xpd_remove}
 };

Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Tue Mar 13 15:09:12 2012
@@ -1809,9 +1809,7 @@
 	.type = XPD_TYPE_FXS,
 	.driver = {
 		   .name = "fxs",
-#ifndef OLD_HOTPLUG_SUPPORT
 		   .owner = THIS_MODULE,
-#endif
 		   .probe = fxs_xpd_probe,
 		   .remove = fxs_xpd_remove}
 };

Modified: linux/trunk/drivers/dahdi/xpp/card_pri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_pri.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_pri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_pri.c Tue Mar 13 15:09:12 2012
@@ -2653,9 +2653,7 @@
 	.type = XPD_TYPE_PRI,
 	.driver = {
 		   .name = "pri",
-#ifndef OLD_HOTPLUG_SUPPORT
 		   .owner = THIS_MODULE,
-#endif
 		   .probe = pri_xpd_probe,
 		   .remove = pri_xpd_remove}
 };

Modified: linux/trunk/drivers/dahdi/xpp/dahdi_debug.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/dahdi_debug.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/dahdi_debug.c (original)
+++ linux/trunk/drivers/dahdi/xpp/dahdi_debug.c Tue Mar 13 15:09:12 2012
@@ -20,11 +20,6 @@
  *
  */
 #include <linux/version.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
-#warning "This module is tested only with 2.6 kernels"
-#endif
-
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/module.h>

Modified: linux/trunk/drivers/dahdi/xpp/parport_debug.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/parport_debug.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/parport_debug.c (original)
+++ linux/trunk/drivers/dahdi/xpp/parport_debug.c Tue Mar 13 15:09:12 2012
@@ -20,11 +20,6 @@
  *
  */
 #include <linux/version.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
-#warning "This module is tested only with 2.6 kernels"
-#endif
-
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/parport.h>

Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.c Tue Mar 13 15:09:12 2012
@@ -20,11 +20,6 @@
  *
  */
 #include <linux/version.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
-#warning "This module is tested only with 2.6 kernels"
-#endif
-
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/errno.h>

Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.h?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.h Tue Mar 13 15:09:12 2012
@@ -354,19 +354,6 @@
 int xbus_sysfs_create(xbus_t *xbus);
 void xbus_sysfs_remove(xbus_t *xbus);
 
-#ifdef	OLD_HOTPLUG_SUPPORT_269
-/* Copy from new kernels lib/kobject_uevent.c */
-enum kobject_action {
-	KOBJ_ADD,
-	KOBJ_REMOVE,
-	KOBJ_CHANGE,
-	KOBJ_MOUNT,
-	KOBJ_UMOUNT,
-	KOBJ_OFFLINE,
-	KOBJ_ONLINE,
-};
-#endif
-
 void astribank_uevent_send(xbus_t *xbus, enum kobject_action act);
 
 #endif /* XBUS_CORE_H */

Modified: linux/trunk/drivers/dahdi/xpp/xbus-pcm.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-pcm.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-pcm.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-pcm.c Tue Mar 13 15:09:12 2012
@@ -20,11 +20,6 @@
  *
  */
 #include <linux/version.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
-#warning "This module is tested only with 2.6 kernels"
-#endif
-
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include "xbus-pcm.h"

Modified: linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c Tue Mar 13 15:09:12 2012
@@ -20,11 +20,6 @@
  *
  */
 #include <linux/version.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
-#warning "This module is tested only with 2.6 kernels"
-#endif
-
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/errno.h>
@@ -286,7 +281,6 @@
 	return len;
 }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
 #define xbus_attr(field, format_string)                                    \
 static ssize_t                                                             \
 field##_show(struct device *dev, struct device_attribute *attr, char *buf) \
@@ -295,16 +289,6 @@
 	xbus = dev_to_xbus(dev);                                           \
 	return sprintf(buf, format_string, xbus->field);                   \
 }
-#else
-#define xbus_attr(field, format_string)                                    \
-static ssize_t                                                             \
-field##_show(struct device *dev, char *buf)                                \
-{                                                                          \
-	xbus_t	*xbus;                                                     \
-	xbus = dev_to_xbus(dev);                                           \
-	return sprintf(buf, format_string, xbus->field);                   \
-}
-#endif
 
 xbus_attr(connector, "%s\n");
 xbus_attr(label, "%s\n");
@@ -333,23 +317,6 @@
 	return 1;
 }
 
-#ifdef OLD_HOTPLUG_SUPPORT
-static int astribank_hotplug(struct device *dev, char **envp, int envnum,
-			     char *buff, int bufsize)
-{
-	xbus_t *xbus;
-
-	if (!dev)
-		return -ENODEV;
-	xbus = dev_to_xbus(dev);
-	envp[0] = buff;
-	if (snprintf(buff, bufsize, "XBUS_NAME=%s", xbus->busname) >= bufsize)
-		return -ENOMEM;
-	envp[1] = NULL;
-	return 0;
-}
-#else
-
 #define	XBUS_VAR_BLOCK	\
 	do {		\
 		XBUS_ADD_UEVENT_VAR("XPP_INIT_DIR=%s", initdir);	\
@@ -407,8 +374,6 @@
 
 #endif
 
-#endif /* OLD_HOTPLUG_SUPPORT */
-
 void astribank_uevent_send(xbus_t *xbus, enum kobject_action act)
 {
 	struct kobject *kobj;
@@ -416,26 +381,7 @@
 	kobj = &xbus->astribank.kobj;
 	XBUS_DBG(DEVICES, xbus, "SYFS bus_id=%s action=%d\n",
 		 dev_name(&xbus->astribank), act);
-
-#if defined(OLD_HOTPLUG_SUPPORT_269)
-	{
-		/* Copy from new kernels lib/kobject_uevent.c */
-		static const char *str[] = {
-			[KOBJ_ADD] "add",
-			[KOBJ_REMOVE] "remove",
-			[KOBJ_CHANGE] "change",
-			[KOBJ_MOUNT] "mount",
-			[KOBJ_UMOUNT] "umount",
-			[KOBJ_OFFLINE] "offline",
-			[KOBJ_ONLINE] "online"
-		};
-		kobject_hotplug(str[act], kobj);
-	}
-#elif defined(OLD_HOTPLUG_SUPPORT)
-	kobject_hotplug(kobj, act);
-#else
 	kobject_uevent(kobj, act);
-#endif
 }
 
 static void astribank_release(struct device *dev)
@@ -461,11 +407,7 @@
 static struct bus_type toplevel_bus_type = {
 	.name = "astribanks",
 	.match = astribank_match,
-#ifdef OLD_HOTPLUG_SUPPORT
-	.hotplug = astribank_hotplug,
-#else
 	.uevent = astribank_uevent,
-#endif
 	.dev_attrs = xbus_dev_attrs,
 	.drv_attrs = xpp_attrs,
 };
@@ -493,9 +435,7 @@
 	.bus = &toplevel_bus_type,
 	.probe = astribank_probe,
 	.remove = astribank_remove,
-#ifndef OLD_HOTPLUG_SUPPORT
 	.owner = THIS_MODULE
-#endif
 };
 
 /*--------- Sysfs XPD handling ----*/

Modified: linux/trunk/drivers/dahdi/xpp/xdefs.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xdefs.h?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xdefs.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xdefs.h Tue Mar 13 15:09:12 2012
@@ -118,16 +118,6 @@
 			kfree(p);			\
 		} while (0);
 
-/*
- * Hotplug replaced with uevent in 2.6.16
- */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
-#define	OLD_HOTPLUG_SUPPORT	// for older kernels
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
-#define	OLD_HOTPLUG_SUPPORT_269	// for way older kernels
-#endif
-
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
 #define	DEVICE_ATTR_READER(name, dev, buf) \
 		ssize_t name(struct device *dev, \

Modified: linux/trunk/drivers/dahdi/xpp/xpd.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpd.h?view=diff&rev=10472&r1=10471&r2=10472
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpd.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xpd.h Tue Mar 13 15:09:12 2012
@@ -42,13 +42,6 @@
 #include <dahdi/kernel.h>
 
 #ifdef __KERNEL__
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
-/* also added in RHEL kernels with the OpenInfiniband backport: */
-#if LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 9) || !defined(DEFINE_SPINLOCK)
-typedef unsigned gfp_t;		/* Added in 2.6.14 */
-#endif
-#endif
-
 /*
  * FIXME: Kludge for 2.6.19
  * bool is now defined as a proper boolean type (gcc _Bool)
@@ -64,23 +57,11 @@
 	module_param(name, type, perm); \
 	MODULE_PARM_DESC(name, desc " [default " #init "]")
 
-#if	LINUX_VERSION_CODE	< KERNEL_VERSION(2, 6, 10)
-/*
- * Old 2.6 kernels had module_param_array() macro that receive the counter
- * by value.
- */
-#define	DEF_ARRAY(type, name, count, init, desc) \
-	unsigned int name ## _num_values; \
-	type name[count] = { [0 ... ((count)-1)] = (init) }; \
-	module_param_array(name, type, name ## _num_values, 0644); \
-	MODULE_PARM_DESC(name, desc " ( 1-" __MODULE_STRING(count) ")")
-#else
 #define	DEF_ARRAY(type, name, count, init, desc) \
 	unsigned int name ## _num_values; \
 	type name[count] = {[0 ... ((count)-1)] = init}; \

[... 330 lines stripped ...]



More information about the dahdi-commits mailing list