diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 13:25:27 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 13:25:27 -0700 |
| commit | f2fea6a31b09a12fe4d9e9e3f9a8e2be017ad611 (patch) | |
| tree | c16afc7b5e4b92cb361c6d2b3ec6f0e9a780a476 /rapidio-convert-bus-code-to-use-bus_groups.patch | |
| parent | e930b8544abee8d7894d5f55af16cb5e7be25f9f (diff) | |
| download | patches-f2fea6a31b09a12fe4d9e9e3f9a8e2be017ad611.tar.gz | |
updates
Diffstat (limited to 'rapidio-convert-bus-code-to-use-bus_groups.patch')
| -rw-r--r-- | rapidio-convert-bus-code-to-use-bus_groups.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/rapidio-convert-bus-code-to-use-bus_groups.patch b/rapidio-convert-bus-code-to-use-bus_groups.patch new file mode 100644 index 00000000000000..15790233ddeb21 --- /dev/null +++ b/rapidio-convert-bus-code-to-use-bus_groups.patch @@ -0,0 +1,65 @@ +From foo@baz Fri Aug 23 13:18:15 PDT 2013 +Date: Fri, 23 Aug 2013 13:18:15 -0700 +To: Greg KH <gregkh@linuxfoundation.org> +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Subject: rapidio: convert bus code to use bus_groups + +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 | 2 +- + drivers/rapidio/rio-sysfs.c | 16 +++++++++++++--- + drivers/rapidio/rio.h | 2 +- + 3 files changed, 15 insertions(+), 5 deletions(-) + +--- a/drivers/rapidio/rio-driver.c ++++ b/drivers/rapidio/rio-driver.c +@@ -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, +--- a/drivers/rapidio/rio-sysfs.c ++++ b/drivers/rapidio/rio-sysfs.c +@@ -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, + }; +--- a/drivers/rapidio/rio.h ++++ b/drivers/rapidio/rio.h +@@ -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)) |
