[dahdi-commits] dahdi/linux.git branch "master" updated.

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Fri Dec 6 15:43:26 CST 2013


branch "master" has been updated
       via  2e7acd212e430bd42234baa98de9616d71140e1e (commit)
      from  71c003ba49a348ed322ee100ca5a058fd0bfab2d (commit)

Summary of changes:
 drivers/dahdi/xpp/xbus-sysfs.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)


- Log -----------------------------------------------------------------
commit 2e7acd212e430bd42234baa98de9616d71140e1e
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Sun Dec 1 23:10:15 2013 -0600

    xpp: Replace drv_attrs with drv_groups on kernels > 3.12
    
    drv_attrs was fully removed from the bus structure in upstream commit
    e18945b159a1cdbc031f1d3b0b7e515a33bdcbf7 which was merged into 3.13.
    
    This is necessary to compile against linux kernel version 3.13.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/drivers/dahdi/xpp/xbus-sysfs.c b/drivers/dahdi/xpp/xbus-sysfs.c
index a394eeb..5861054 100644
--- a/drivers/dahdi/xpp/xbus-sysfs.c
+++ b/drivers/dahdi/xpp/xbus-sysfs.c
@@ -55,10 +55,19 @@ static ssize_t sync_store(struct device_driver *driver, const char *buf,
 	return exec_sync_command(buf, count);
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
 static struct driver_attribute xpp_attrs[] = {
 	__ATTR(sync, S_IRUGO | S_IWUSR, sync_show, sync_store),
 	__ATTR_NULL,
 };
+#else
+static DRIVER_ATTR_RW(sync);
+static struct attribute *xpp_attrs[] = {
+	&driver_attr_sync.attr,
+	NULL,
+};
+ATTRIBUTE_GROUPS(xpp);
+#endif
 
 /*--------- Sysfs Bus handling ----*/
 static DEVICE_ATTR_READER(xbus_state_show, dev, buf)
@@ -410,7 +419,11 @@ static struct bus_type toplevel_bus_type = {
 	.match = astribank_match,
 	.uevent = astribank_uevent,
 	.dev_attrs = xbus_dev_attrs,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
 	.drv_attrs = xpp_attrs,
+#else
+	.drv_groups = xpp_groups,
+#endif
 };
 
 static int astribank_probe(struct device *dev)

-----------------------------------------------------------------------


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list