]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rapidio: convert bus code to use bus_groups
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Aug 2013 21:24:29 +0000 (14:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 22:49:42 +0000 (15:49 -0700)
The bus_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the rapidio bus code to use the
correct field.

Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rapidio/rio-driver.c
drivers/rapidio/rio-sysfs.c
drivers/rapidio/rio.h

index 3e9b6a78ad18a4dcff861886d0828b5622aad267..2be2d24dbecb6382bca85a639623dd8689583ad5 100644 (file)
@@ -224,7 +224,7 @@ struct bus_type rio_bus_type = {
        .name = "rapidio",
        .match = rio_match_bus,
        .dev_attrs = rio_dev_attrs,
-       .bus_attrs = rio_bus_attrs,
+       .bus_groups = rio_bus_groups,
        .probe = rio_device_probe,
        .remove = rio_device_remove,
        .uevent = rio_uevent,
index 9331be646dc34d4075df3b6512975efe3eec8c1a..795a4776cb0ccde5e1b2521b5e1606090ba4830a 100644 (file)
@@ -316,8 +316,18 @@ exit:
 
        return rc;
 }
+static BUS_ATTR(scan, (S_IWUSR|S_IWGRP), NULL, bus_scan_store);
 
-struct bus_attribute rio_bus_attrs[] = {
-       __ATTR(scan, (S_IWUSR|S_IWGRP), NULL, bus_scan_store),
-       __ATTR_NULL
+static struct attribute *rio_bus_attrs[] = {
+       &bus_attr_scan.attr,
+       NULL,
+};
+
+static const struct attribute_group rio_bus_group = {
+       .attrs = rio_bus_attrs,
+};
+
+const struct attribute_group *rio_bus_groups[] = {
+       &rio_bus_group,
+       NULL,
 };
index 085215cd8502f5b12ca93787a267eef1d173759a..57d2ad06a816c3ba4e7e73dde2baae087b362e17 100644 (file)
@@ -49,7 +49,7 @@ extern int rio_mport_scan(int mport_id);
 
 /* Structures internal to the RIO core code */
 extern struct device_attribute rio_dev_attrs[];
-extern struct bus_attribute rio_bus_attrs[];
+extern const struct attribute_group *rio_bus_groups[];
 
 #define RIO_GET_DID(size, x)   (size ? (x & 0xffff) : ((x & 0x00ff0000) >> 16))
 #define RIO_SET_DID(size, x)   (size ? (x & 0xffff) : ((x & 0x000000ff) << 16))