No subject


Thu Jan 15 22:29:28 CST 2009


Modified:
    branches/1.4/kernel/xpp/card_bri.c
    branches/1.4/kernel/xpp/card_fxo.c
    branches/1.4/kernel/xpp/card_fxs.c
    branches/1.4/kernel/xpp/card_pri.c
    branches/1.4/kernel/xpp/xbus-sysfs.c
    branches/1.4/kernel/xpp/xdefs.h

Modified: branches/1.4/kernel/xpp/card_bri.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/card_bri.c?view=diff&rev=4649&r1=4648&r2=4649
==============================================================================
--- branches/1.4/kernel/xpp/card_bri.c (original)
+++ branches/1.4/kernel/xpp/card_bri.c Wed May 27 08:15:29 2009
@@ -1785,7 +1785,7 @@
 	/* Is it our device? */
 	if(xpd->type != XPD_TYPE_BRI) {
 		XPD_ERR(xpd, "drop suggestion for %s (%d)\n",
-			dev->bus_id, xpd->type);
+			dev_name(dev), xpd->type);
 		return -EINVAL;
 	}
 	XPD_DBG(DEVICES, xpd, "SYSFS\n");

Modified: branches/1.4/kernel/xpp/card_fxo.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/card_fxo.c?view=diff&rev=4649&r1=4648&r2=4649
==============================================================================
--- branches/1.4/kernel/xpp/card_fxo.c (original)
+++ branches/1.4/kernel/xpp/card_fxo.c Wed May 27 08:15:29 2009
@@ -1359,7 +1359,7 @@
 	/* Is it our device? */
 	if(xpd->type != XPD_TYPE_FXO) {
 		XPD_ERR(xpd, "drop suggestion for %s (%d)\n",
-			dev->bus_id, xpd->type);
+			dev_name(dev), xpd->type);
 		return -EINVAL;
 	}
 	XPD_DBG(DEVICES, xpd, "SYSFS\n");

Modified: branches/1.4/kernel/xpp/card_fxs.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/card_fxs.c?view=diff&rev=4649&r1=4648&r2=4649
==============================================================================
--- branches/1.4/kernel/xpp/card_fxs.c (original)
+++ branches/1.4/kernel/xpp/card_fxs.c Wed May 27 08:15:29 2009
@@ -1504,7 +1504,7 @@
 	/* Is it our device? */
 	if(xpd->type != XPD_TYPE_FXS) {
 		XPD_ERR(xpd, "drop suggestion for %s (%d)\n",
-			dev->bus_id, xpd->type);
+			dev_name(dev), xpd->type);
 		return -EINVAL;
 	}
 	XPD_DBG(DEVICES, xpd, "SYSFS\n");

Modified: branches/1.4/kernel/xpp/card_pri.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/card_pri.c?view=diff&rev=4649&r1=4648&r2=4649
==============================================================================
--- branches/1.4/kernel/xpp/card_pri.c (original)
+++ branches/1.4/kernel/xpp/card_pri.c Wed May 27 08:15:29 2009
@@ -2087,7 +2087,7 @@
 	/* Is it our device? */
 	if(xpd->type != XPD_TYPE_PRI) {
 		XPD_ERR(xpd, "drop suggestion for %s (%d)\n",
-			dev->bus_id, xpd->type);
+			dev_name(dev), xpd->type);
 		return -EINVAL;
 	}
 	XPD_DBG(DEVICES, xpd, "SYSFS\n");

Modified: branches/1.4/kernel/xpp/xbus-sysfs.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/xbus-sysfs.c?view=diff&rev=4649&r1=4648&r2=4649
==============================================================================
--- branches/1.4/kernel/xpp/xbus-sysfs.c (original)
+++ branches/1.4/kernel/xpp/xbus-sysfs.c Wed May 27 08:15:29 2009
@@ -279,7 +279,7 @@
 static int astribank_match(struct device *dev, struct device_driver *driver)
 {
 	DBG(DEVICES, "SYSFS MATCH: dev->bus_id = %s, driver->name = %s\n",
-		dev->bus_id, driver->name);
+		dev_name(dev), driver->name);
 	return 1;
 }
 
@@ -326,7 +326,7 @@
 	if(!dev)
 		return -ENODEV;
 	xbus = dev_to_xbus(dev);
-	DBG(GENERAL, "SYFS bus_id=%s xbus=%s\n", dev->bus_id, xbus->busname);
+	DBG(GENERAL, "SYFS bus_id=%s xbus=%s\n", dev_name(dev), xbus->busname);
 	XBUS_VAR_BLOCK;
 	envp[i] = NULL;
 	return 0;
@@ -348,7 +348,7 @@
 	if(!dev)
 		return -ENODEV;
 	xbus = dev_to_xbus(dev);
-	DBG(GENERAL, "SYFS bus_id=%s xbus=%s\n", dev->bus_id, xbus->busname);
+	DBG(GENERAL, "SYFS bus_id=%s xbus=%s\n", dev_name(dev), xbus->busname);
 	XBUS_VAR_BLOCK;
 	return 0;
 }
@@ -363,7 +363,7 @@
 
 	kobj = &xbus->astribank.kobj;
 	XBUS_DBG(DEVICES, xbus, "SYFS bus_id=%s action=%d\n",
-		xbus->astribank.bus_id, act);
+		dev_name(&xbus->astribank), act);
 
 #if defined(OLD_HOTPLUG_SUPPORT_269)
 	{
@@ -649,7 +649,7 @@
 		return 0;
 	}
 	XPD_DBG(DEVICES, xpd, "SYSFS MATCH: type=%d dev->bus_id = %s, driver->name = %s\n",
-		xpd->type, dev->bus_id, driver->name);
+		xpd->type, dev_name(dev), driver->name);
 	return 1;
 }
 
@@ -705,8 +705,8 @@
 	XPD_DBG(DEVICES, xpd, "SYSFS\n");
 	dev->bus = &xpd_type;
 	dev->parent = &xbus->astribank;
-	snprintf(dev->bus_id, BUS_ID_SIZE, "%02d:%1x:%1x",
-		xbus->num, xpd->addr.unit, xpd->addr.subunit);
+	dev_set_name(dev, "%02d:%1x:%1x", xbus->num, xpd->addr.unit, 
+			xpd->addr.subunit);
 	dev->driver_data = xpd;
 	dev->release = xpd_release;
 	ret = device_register(dev);
@@ -763,7 +763,7 @@
 	XBUS_DBG(DEVICES, xbus, "\n");
 	astribank->bus = &toplevel_bus_type;
 	astribank->parent = xbus->transport.transport_device;
-	snprintf(astribank->bus_id, BUS_ID_SIZE, "xbus-%02d", xbus->num);
+	dev_set_name(astribank, "xbus-%02d", xbus->num);
 	astribank->driver_data = xbus;
 	astribank->release = astribank_release;
 	ret = device_register(astribank);

Modified: branches/1.4/kernel/xpp/xdefs.h
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/xdefs.h?view=diff&rev=4649&r1=4648&r2=4649
==============================================================================
--- branches/1.4/kernel/xpp/xdefs.h (original)
+++ branches/1.4/kernel/xpp/xdefs.h Wed May 27 08:15:29 2009
@@ -143,6 +143,12 @@
 #define	DRIVER_ATTR_READER(name,drv,buf)	\
 		ssize_t name(struct device_driver *drv, char * buf)
 
+#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)
 /* Also don't define this for later RHEL >= 5.2 . hex_asc is from the 
  * same linux-2.6-net-infrastructure-updates-to-mac80211-iwl4965.patch




More information about the zaptel-commits mailing list