[svn-commits] tzafrir: branch linux/tzafrir/sysfs r8369 - /linux/team/tzafrir/sysfs/drivers...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Mar 21 15:25:29 CDT 2010


Author: tzafrir
Date: Sun Mar 21 15:25:25 2010
New Revision: 8369

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8369
Log:
xpp: Make the 'location' string unique for different spans of same device

Modified:
    linux/team/tzafrir/sysfs/drivers/dahdi/xpp/xpp_dahdi.c

Modified: linux/team/tzafrir/sysfs/drivers/dahdi/xpp/xpp_dahdi.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/tzafrir/sysfs/drivers/dahdi/xpp/xpp_dahdi.c?view=diff&rev=8369&r1=8368&r2=8369
==============================================================================
--- linux/team/tzafrir/sysfs/drivers/dahdi/xpp/xpp_dahdi.c (original)
+++ linux/team/tzafrir/sysfs/drivers/dahdi/xpp/xpp_dahdi.c Sun Mar 21 15:25:25 2010
@@ -1112,15 +1112,10 @@
 		"Astribank: Unit %x Subunit %x: %s",
 		XBUS_UNIT(xpd->xbus_idx), XBUS_SUBUNIT(xpd->xbus_idx),
 		xpd->type_name);
-	/*
-	 * location is the only usefull new data item.
-	 * For our devices it was available for ages via:
-	 *  - The legacy "/proc/xpp/XBUS-??/summary" (CONNECTOR=...)
-	 *  - The same info in "/proc/xpp/xbuses"
-	 *  - The modern "/sys/bus/astribanks/devices/xbus-??/connector" attribute
-	 * So let's also export it via the newfangled "location" field.
-	 */
-	snprintf(span->location, sizeof(span->location) - 1, "%s", xbus->connector); 
+	/* The location is: <Connector>!<XPD-Number> */
+	snprintf(span->location, sizeof(span->location) - 1, "%s!%d%d",
+			xbus->connector, xpd->addr.unit,
+			xpd->addr.subunit); 
 	/*
 	 * Who said a span and irq have 1-1 relationship?
 	 * Also exporting this low-level detail isn't too wise.




More information about the svn-commits mailing list