diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 17:24:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 18:49:42 -0400 |
commit | ed1d2da28ea17e6f5e06111aac957d9847faff17 (patch) | |
tree | c646e8e90f28b850f97730ed42b5699b51dcc8da | |
parent | 3e358ac2bb5bb9c9f4842145ca0da2384d13fd98 (diff) |
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>
-rw-r--r-- | drivers/rapidio/rio-driver.c | 2 | ||||
-rw-r--r-- | drivers/rapidio/rio-sysfs.c | 16 | ||||
-rw-r--r-- | drivers/rapidio/rio.h | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/drivers/rapidio/rio-driver.c b/drivers/rapidio/rio-driver.c index 3e9b6a78ad18..2be2d24dbecb 100644 --- a/drivers/rapidio/rio-driver.c +++ b/drivers/rapidio/rio-driver.c | |||
@@ -224,7 +224,7 @@ struct bus_type rio_bus_type = { | |||
224 | .name = "rapidio", | 224 | .name = "rapidio", |
225 | .match = rio_match_bus, | 225 | .match = rio_match_bus, |
226 | .dev_attrs = rio_dev_attrs, | 226 | .dev_attrs = rio_dev_attrs, |
227 | .bus_attrs = rio_bus_attrs, | 227 | .bus_groups = rio_bus_groups, |
228 | .probe = rio_device_probe, | 228 | .probe = rio_device_probe, |
229 | .remove = rio_device_remove, | 229 | .remove = rio_device_remove, |
230 | .uevent = rio_uevent, | 230 | .uevent = rio_uevent, |
diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c index 9331be646dc3..795a4776cb0c 100644 --- a/drivers/rapidio/rio-sysfs.c +++ b/drivers/rapidio/rio-sysfs.c | |||
@@ -316,8 +316,18 @@ exit: | |||
316 | 316 | ||
317 | return rc; | 317 | return rc; |
318 | } | 318 | } |
319 | static BUS_ATTR(scan, (S_IWUSR|S_IWGRP), NULL, bus_scan_store); | ||
319 | 320 | ||
320 | struct bus_attribute rio_bus_attrs[] = { | 321 | static struct attribute *rio_bus_attrs[] = { |
321 | __ATTR(scan, (S_IWUSR|S_IWGRP), NULL, bus_scan_store), | 322 | &bus_attr_scan.attr, |
322 | __ATTR_NULL | 323 | NULL, |
324 | }; | ||
325 | |||
326 | static const struct attribute_group rio_bus_group = { | ||
327 | .attrs = rio_bus_attrs, | ||
328 | }; | ||
329 | |||
330 | const struct attribute_group *rio_bus_groups[] = { | ||
331 | &rio_bus_group, | ||
332 | NULL, | ||
323 | }; | 333 | }; |
diff --git a/drivers/rapidio/rio.h b/drivers/rapidio/rio.h index 085215cd8502..57d2ad06a816 100644 --- a/drivers/rapidio/rio.h +++ b/drivers/rapidio/rio.h | |||
@@ -49,7 +49,7 @@ extern int rio_mport_scan(int mport_id); | |||
49 | 49 | ||
50 | /* Structures internal to the RIO core code */ | 50 | /* Structures internal to the RIO core code */ |
51 | extern struct device_attribute rio_dev_attrs[]; | 51 | extern struct device_attribute rio_dev_attrs[]; |
52 | extern struct bus_attribute rio_bus_attrs[]; | 52 | extern const struct attribute_group *rio_bus_groups[]; |
53 | 53 | ||
54 | #define RIO_GET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x00ff0000) >> 16)) | 54 | #define RIO_GET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x00ff0000) >> 16)) |
55 | #define RIO_SET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x000000ff) << 16)) | 55 | #define RIO_SET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x000000ff) << 16)) |