[Pkg-voip-commits] r7583 - in /zaptel/branches/lenny/debian: changelog patches/series patches/xpp_procfs_owner_2630 patches/xpp_sysfs_busid_2630

tzafrir-guest at alioth.debian.org tzafrir-guest at alioth.debian.org
Wed Sep 9 04:51:34 UTC 2009


Author: tzafrir-guest
Date: Wed Sep  9 04:51:34 2009
New Revision: 7583

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=7583
Log:
Patches xpp_sysfs_busid_2630 xpp_procfs_owner_2630: Fix two 2.6.30
build issues (Closes: #537202).

Added:
    zaptel/branches/lenny/debian/patches/xpp_procfs_owner_2630
    zaptel/branches/lenny/debian/patches/xpp_sysfs_busid_2630
Modified:
    zaptel/branches/lenny/debian/changelog
    zaptel/branches/lenny/debian/patches/series

Modified: zaptel/branches/lenny/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/branches/lenny/debian/changelog?rev=7583&op=diff
==============================================================================
--- zaptel/branches/lenny/debian/changelog (original)
+++ zaptel/branches/lenny/debian/changelog Wed Sep  9 04:51:34 2009
@@ -6,8 +6,10 @@
     (Closes: #518017)
   * Tell Zaptel we do want our custom OSLEC echo canceller (Closes: #510858).
   * Fix URLs: digium.com -> asterisk.org .
-
- -- Tzafrir Cohen <tzafrir.cohen at xorcom.com>  Tue, 20 Jan 2009 15:54:04 +0200
+  * Patches xpp_sysfs_busid_2630 xpp_procfs_owner_2630: Fix two 2.6.30
+    build issues (Closes: #537202).
+
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com>  Wed, 09 Sep 2009 07:48:34 +0300
 
 zaptel (1:1.4.11~dfsg-3) unstable; urgency=high
 

Modified: zaptel/branches/lenny/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/branches/lenny/debian/patches/series?rev=7583&op=diff
==============================================================================
--- zaptel/branches/lenny/debian/patches/series (original)
+++ zaptel/branches/lenny/debian/patches/series Wed Sep  9 04:51:34 2009
@@ -17,3 +17,5 @@
 wcte12xp_flags 
 fix_sync_validation
 hrtimer_2628
+xpp_sysfs_busid_2630
+xpp_procfs_owner_2630

Added: zaptel/branches/lenny/debian/patches/xpp_procfs_owner_2630
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/branches/lenny/debian/patches/xpp_procfs_owner_2630?rev=7583&op=file
==============================================================================
--- zaptel/branches/lenny/debian/patches/xpp_procfs_owner_2630 (added)
+++ zaptel/branches/lenny/debian/patches/xpp_procfs_owner_2630 Wed Sep  9 04:51:34 2009
@@ -1,0 +1,172 @@
+xpp: 'owner' property of procfs was dropped in 2.6.30.
+
+This adds a compatibility macro for older versions that is a noop for
+kernels >= 2.6.30.
+
+From dahdi-linux r6642, r6659 , regarding issue #14964 .
+    
+Source: http://svn.digium.com/svn/zaptel/branches/1.4@4648
+
+--- a/kernel/xpp/card_bri.c
++++ b/kernel/xpp/card_bri.c
+@@ -602,7 +602,7 @@ static int bri_proc_create(xbus_t *xbus,
+ 		XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_BRI_INFO_FNAME);
+ 		goto err;
+ 	}
+-	priv->bri_info->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(priv->bri_info);
+ #endif
+ 	return 0;
+ err:
+--- a/kernel/xpp/card_fxo.c
++++ b/kernel/xpp/card_fxo.c
+@@ -406,7 +406,7 @@ static int fxo_proc_create(xbus_t *xbus,
+ 		XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_FXO_INFO_FNAME);
+ 		goto err;
+ 	}
+-	priv->fxo_info->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(priv->fxo_info);
+ #ifdef	WITH_METERING
+ 	XPD_DBG(PROC, xpd, "Creating Metering tone file\n");
+ 	priv->meteringfile = create_proc_read_entry(PROC_METERING_FNAME, 0444, xpd->proc_xpd_dir,
+@@ -415,7 +415,7 @@ static int fxo_proc_create(xbus_t *xbus,
+ 		XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_METERING_FNAME);
+ 		goto err;
+ 	}
+-	priv->meteringfile->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(priv->meteringfile);
+ #endif
+ #endif
+ 	return 0;
+--- a/kernel/xpp/card_fxs.c
++++ b/kernel/xpp/card_fxs.c
+@@ -340,7 +340,7 @@ static int fxs_proc_create(xbus_t *xbus,
+ 		XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_FXS_INFO_FNAME);
+ 		goto err;
+ 	}
+-	priv->fxs_info->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(priv->fxs_info);
+ #ifdef	WITH_METERING
+ 	XPD_DBG(PROC, xpd, "Creating Metering tone file\n");
+ 	priv->meteringfile = create_proc_entry(PROC_METERING_FNAME, 0200, xpd->proc_xpd_dir);
+@@ -348,7 +348,7 @@ static int fxs_proc_create(xbus_t *xbus,
+ 		XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_METERING_FNAME);
+ 		goto err;
+ 	}
+-	priv->meteringfile->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(priv->meteringfile);
+ 	priv->meteringfile->write_proc = proc_xpd_metering_write;
+ 	priv->meteringfile->read_proc = NULL;
+ 	priv->meteringfile->data = xpd;
+--- a/kernel/xpp/card_global.c
++++ b/kernel/xpp/card_global.c
+@@ -380,7 +380,7 @@ int chip_proc_create(xbus_t *xbus, xpd_t
+ 		XPD_ERR(xpd, "Failed to create proc file '%s'\n", CHIP_REGISTERS);
+ 		goto err;
+ 	}
+-	xpd->proc_xpd_chipregs->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(xpd->proc_xpd_chipregs);
+ 	xpd->proc_xpd_chipregs->write_proc = proc_xpd_register_write;
+ 	xpd->proc_xpd_chipregs->read_proc = proc_xpd_register_read;
+ 	xpd->proc_xpd_chipregs->data = xpd;
+--- a/kernel/xpp/card_pri.c
++++ b/kernel/xpp/card_pri.c
+@@ -366,7 +366,7 @@ static int pri_proc_create(xbus_t *xbus,
+ 		XPD_ERR(xpd, "Failed to create proc '%s'\n", PROC_PRI_INFO_FNAME);
+ 		goto err;
+ 	}
+-	priv->pri_info->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(priv->pri_info);
+ 	priv->pri_info->write_proc = proc_pri_info_write;
+ 	priv->pri_info->read_proc = proc_pri_info_read;
+ 	priv->pri_info->data = xpd;
+--- a/kernel/xpp/xbus-core.c
++++ b/kernel/xpp/xbus-core.c
+@@ -985,7 +985,7 @@ static struct xbus_workqueue *worker_new
+ 			XBUS_ERR(xbus, "Failed to create proc file '%s'\n", PROC_XBUS_WAITFOR_XPDS);
+ 			goto err;
+ 		}
+-		worker->proc_xbus_waitfor_xpds->owner = THIS_MODULE;
++		SET_PROC_DIRENTRY_OWNER(worker->proc_xbus_waitfor_xpds);
+ 	}
+ #endif
+ 	return worker;
+@@ -1194,7 +1194,7 @@ xbus_t *xbus_new(struct xbus_ops *ops, u
+ 		err = -EIO;
+ 		goto nobus;
+ 	}
+-	xbus->proc_xbus_summary->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(xbus->proc_xbus_summary);
+ #ifdef	PROTOCOL_DEBUG
+ 	xbus->proc_xbus_command = create_proc_entry(PROC_XBUS_COMMAND, 0200, xbus->proc_xbus_dir);
+ 	if (!xbus->proc_xbus_command) {
+@@ -1204,7 +1204,7 @@ xbus_t *xbus_new(struct xbus_ops *ops, u
+ 	}
+ 	xbus->proc_xbus_command->write_proc = proc_xbus_command_write;
+ 	xbus->proc_xbus_command->data = xbus;
+-	xbus->proc_xbus_command->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(xbus->proc_xbus_command);
+ #endif
+ #endif
+ #ifdef	XPP_DEBUGFS
+@@ -1649,7 +1649,7 @@ int __init xbus_core_init(void)
+ 		ret = -EFAULT;
+ 		goto err;
+ 	}
+-	proc_xbuses->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(proc_xbuses);
+ #endif
+ #ifdef	XPP_DEBUGFS
+ 	DBG(GENERAL, "Creating debugfs xpp root\n");
+--- a/kernel/xpp/xdefs.h
++++ b/kernel/xpp/xdefs.h
+@@ -90,6 +90,11 @@ struct list_head { struct list_head *nex
+ #if MAX_SUBUNIT > BIT(SUBUNIT_BITS)
+ #error "MAX_SUBUNIT too large"
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
++#define	SET_PROC_DIRENTRY_OWNER(p)	do { (p)->owner = THIS_MODULE; } while(0);
++#else
++#define	SET_PROC_DIRENTRY_OWNER(p)	do { } while(0);
++#endif
+ 
+ #define	MAX_XPDS		(MAX_UNIT*MAX_SUBUNIT)
+ 
+--- a/kernel/xpp/xpp_usb.c
++++ b/kernel/xpp/xpp_usb.c
+@@ -756,7 +756,7 @@ static int xusb_probe(struct usb_interfa
+ 		retval = -EIO;
+ 		goto probe_failed;
+ 	}
+-	procsummary->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(procsummary);
+ #endif
+ 	bus_count++;
+ 	xusb->xbus_num = xbus->num;
+--- a/kernel/xpp/xpp_zap.c
++++ b/kernel/xpp/xpp_zap.c
+@@ -160,13 +160,13 @@ static int xpd_proc_create(xbus_t *xbus,
+ 		XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_XPD_SUMMARY);
+ 		goto err;
+ 	}
+-	xpd->proc_xpd_summary->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(xpd->proc_xpd_summary);
+ 	xpd->proc_xpd_ztregister = create_proc_entry(PROC_XPD_ZTREGISTER, 0644, xpd->proc_xpd_dir);
+ 	if (!xpd->proc_xpd_ztregister) {
+ 		XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_XPD_ZTREGISTER);
+ 		goto err;
+ 	}
+-	xpd->proc_xpd_ztregister->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(xpd->proc_xpd_ztregister);
+ 	xpd->proc_xpd_ztregister->data = xpd;
+ 	xpd->proc_xpd_ztregister->read_proc = proc_xpd_ztregister_read;
+ 	xpd->proc_xpd_ztregister->write_proc = proc_xpd_ztregister_write;
+@@ -175,7 +175,7 @@ static int xpd_proc_create(xbus_t *xbus,
+ 		XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_XPD_BLINK);
+ 		goto err;
+ 	}
+-	xpd->proc_xpd_blink->owner = THIS_MODULE;
++	SET_PROC_DIRENTRY_OWNER(xpd->proc_xpd_blink);
+ 	xpd->proc_xpd_blink->data = xpd;
+ 	xpd->proc_xpd_blink->read_proc = proc_xpd_blink_read;
+ 	xpd->proc_xpd_blink->write_proc = proc_xpd_blink_write;

Added: zaptel/branches/lenny/debian/patches/xpp_sysfs_busid_2630
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/branches/lenny/debian/patches/xpp_sysfs_busid_2630?rev=7583&op=file
==============================================================================
--- zaptel/branches/lenny/debian/patches/xpp_sysfs_busid_2630 (added)
+++ zaptel/branches/lenny/debian/patches/xpp_sysfs_busid_2630 Wed Sep  9 04:51:34 2009
@@ -1,0 +1,72 @@
+xpp: Replaece member bus_id with dev_name() and set_dev_name()
+
+As of 2.6.26 the macros dev_name() and set_dev_name() are used to read
+and set (respectively) the bus_id member in sysfs. As of 2.6.30 bus_id
+is gone. This patch provides comaptiobility macros for older kernel
+versions and removes direct usage of bus_id.
+
+From dahdi-linux r6637.  Regarding issue #14965 .
+
+Source: http://svn.digium.com/svn/zaptel/branches/1.4@4649
+
+--- a/kernel/xpp/xbus-sysfs.c
++++ b/kernel/xpp/xbus-sysfs.c
+@@ -72,7 +72,7 @@ extern int debug;
+ /*--------- Sysfs Bus handling ----*/
+ static int xpp_bus_match(struct device *dev, struct device_driver *driver)
+ {
+-	DBG(GENERAL, "dev->bus_id = %s, driver->name = %s\n", dev->bus_id, driver->name);
++	DBG(GENERAL, "dev->bus_id = %s, driver->name = %s\n", dev_name(dev), driver->name);
+ 	return 1;
+ }
+ 
+@@ -119,7 +119,7 @@ static int xpp_bus_uevent(struct device 
+ 	if(!dev)
+ 		return -ENODEV;
+ 	xbus = dev_to_xbus(dev);
+-	DBG(GENERAL, "bus_id=%s xbus=%s\n", dev->bus_id, xbus->busname);
++	DBG(GENERAL, "bus_id=%s xbus=%s\n", deb_name(bus_id), xbus->busname);
+ 	XBUS_VAR_BLOCK;
+ 	envp[i] = NULL;
+ 	return 0;
+@@ -140,7 +140,7 @@ static int xpp_bus_uevent(struct device 
+ 	if(!dev)
+ 		return -ENODEV;
+ 	xbus = dev_to_xbus(dev);
+-	DBG(GENERAL, "bus_id=%s xbus=%s\n", dev->bus_id, xbus->busname);
++	DBG(GENERAL, "bus_id=%s xbus=%s\n", dev_name(xbus), xbus->busname);
+ 	XBUS_VAR_BLOCK;
+ 	return 0;
+ }
+@@ -173,7 +173,6 @@ static struct bus_type xpp_bus_type = {
+ };
+ 
+ static struct device xpp_bus = {
+-	.bus_id		= "xppbus",
+ 	.release	= xpp_bus_release
+ };
+ 
+@@ -381,7 +380,7 @@ int xbus_sysfs_create(xbus_t *xbus)
+ 	device_initialize(astribank);
+ 	astribank->bus = &xpp_bus_type;
+ 	astribank->parent = &xpp_bus;
+-	snprintf(astribank->bus_id, BUS_ID_SIZE, "xbus-%02d", xbus->num);
++	dev_set_name(astribank, "xbus-%02d", xbus->num);
+ 	astribank->driver_data = NULL;	/* override below */
+ 	astribank->release = xpp_dev_release;
+ 	ret = device_register(astribank);
+--- a/kernel/xpp/xdefs.h
++++ b/kernel/xpp/xdefs.h
+@@ -118,6 +118,12 @@ typedef unsigned char		byte;
+ 					kfree(p);			\
+ 				} while(0);
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
++#define dev_name(dev)		(dev)->bus_id
++#define dev_set_name(dev, format, ...) \
++	snprintf((dev)->bus_id, BUS_ID_SIZE, format, ## __VA_ARGS__);
++#endif
++
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ typedef int			bool;
+ #endif




More information about the Pkg-voip-commits mailing list