diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-07 02:55:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-16 21:36:03 -0400 |
commit | 4e9072d61695abcee201591ba9515a28bcb3bd33 (patch) | |
tree | e4e56c84752bf8912bc2033d86d420d8ac88bc79 | |
parent | 6d39c80b19073e2889dabab939fe1a09584138ed (diff) |
ssb: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead. This converts the ssb bus code to use the
correct field.
Cc: Michael Buesch <m@bues.ch>
Cc: <netdev@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/ssb/main.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index e55ddf7cd7c2..32a811d11c25 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -374,7 +374,8 @@ static ssize_t \ | |||
374 | attrib##_show(struct device *dev, struct device_attribute *attr, char *buf) \ | 374 | attrib##_show(struct device *dev, struct device_attribute *attr, char *buf) \ |
375 | { \ | 375 | { \ |
376 | return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ | 376 | return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \ |
377 | } | 377 | } \ |
378 | static DEVICE_ATTR_RO(attrib); | ||
378 | 379 | ||
379 | ssb_config_attr(core_num, core_index, "%u\n") | 380 | ssb_config_attr(core_num, core_index, "%u\n") |
380 | ssb_config_attr(coreid, id.coreid, "0x%04x\n") | 381 | ssb_config_attr(coreid, id.coreid, "0x%04x\n") |
@@ -387,16 +388,18 @@ name_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
387 | return sprintf(buf, "%s\n", | 388 | return sprintf(buf, "%s\n", |
388 | ssb_core_name(dev_to_ssb_dev(dev)->id.coreid)); | 389 | ssb_core_name(dev_to_ssb_dev(dev)->id.coreid)); |
389 | } | 390 | } |
390 | 391 | static DEVICE_ATTR_RO(name); | |
391 | static struct device_attribute ssb_device_attrs[] = { | 392 | |
392 | __ATTR_RO(name), | 393 | static struct attribute *ssb_device_attrs[] = { |
393 | __ATTR_RO(core_num), | 394 | &dev_attr_name.attr, |
394 | __ATTR_RO(coreid), | 395 | &dev_attr_core_num.attr, |
395 | __ATTR_RO(vendor), | 396 | &dev_attr_coreid.attr, |
396 | __ATTR_RO(revision), | 397 | &dev_attr_vendor.attr, |
397 | __ATTR_RO(irq), | 398 | &dev_attr_revision.attr, |
398 | __ATTR_NULL, | 399 | &dev_attr_irq.attr, |
400 | NULL, | ||
399 | }; | 401 | }; |
402 | ATTRIBUTE_GROUPS(ssb_device); | ||
400 | 403 | ||
401 | static struct bus_type ssb_bustype = { | 404 | static struct bus_type ssb_bustype = { |
402 | .name = "ssb", | 405 | .name = "ssb", |
@@ -407,7 +410,7 @@ static struct bus_type ssb_bustype = { | |||
407 | .suspend = ssb_device_suspend, | 410 | .suspend = ssb_device_suspend, |
408 | .resume = ssb_device_resume, | 411 | .resume = ssb_device_resume, |
409 | .uevent = ssb_device_uevent, | 412 | .uevent = ssb_device_uevent, |
410 | .dev_attrs = ssb_device_attrs, | 413 | .dev_groups = ssb_device_groups, |
411 | }; | 414 | }; |
412 | 415 | ||
413 | static void ssb_buses_lock(void) | 416 | static void ssb_buses_lock(void) |