Commit ed1d2da2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e358ac2
...@@ -224,7 +224,7 @@ struct bus_type rio_bus_type = { ...@@ -224,7 +224,7 @@ struct bus_type rio_bus_type = {
.name = "rapidio", .name = "rapidio",
.match = rio_match_bus, .match = rio_match_bus,
.dev_attrs = rio_dev_attrs, .dev_attrs = rio_dev_attrs,
.bus_attrs = rio_bus_attrs, .bus_groups = rio_bus_groups,
.probe = rio_device_probe, .probe = rio_device_probe,
.remove = rio_device_remove, .remove = rio_device_remove,
.uevent = rio_uevent, .uevent = rio_uevent,
......
...@@ -316,8 +316,18 @@ static ssize_t bus_scan_store(struct bus_type *bus, const char *buf, ...@@ -316,8 +316,18 @@ static ssize_t bus_scan_store(struct bus_type *bus, const char *buf,
return rc; return rc;
} }
static BUS_ATTR(scan, (S_IWUSR|S_IWGRP), NULL, bus_scan_store);
struct bus_attribute rio_bus_attrs[] = { static struct attribute *rio_bus_attrs[] = {
__ATTR(scan, (S_IWUSR|S_IWGRP), NULL, bus_scan_store), &bus_attr_scan.attr,
__ATTR_NULL NULL,
};
static const struct attribute_group rio_bus_group = {
.attrs = rio_bus_attrs,
};
const struct attribute_group *rio_bus_groups[] = {
&rio_bus_group,
NULL,
}; };
...@@ -49,7 +49,7 @@ extern int rio_mport_scan(int mport_id); ...@@ -49,7 +49,7 @@ extern int rio_mport_scan(int mport_id);
/* Structures internal to the RIO core code */ /* Structures internal to the RIO core code */
extern struct device_attribute rio_dev_attrs[]; 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_GET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x00ff0000) >> 16))
#define RIO_SET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x000000ff) << 16)) #define RIO_SET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x000000ff) << 16))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment