aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/firmware_class.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-28 10:42:30 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-29 15:12:12 -0500
commit3f214cff7c6e666c6f950cd802d4239778f0d37e (patch)
treed38c5158dd0b44976fc91629951685d737838a7c /drivers/base/firmware_class.c
parentf76d25275c314defb684fdd692239507001774bc (diff)
driver core: firmware_class: convert to use class_groups
Convert the firmware core to use class_groups instead of class_attrs as that's the correct way to handle lists of class attribute files. Cc: Ming Lei <ming.lei@canonical.com> Acked-by: Luis R. Rodriguez <mcgrof@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/firmware_class.c')
-rw-r--r--drivers/base/firmware_class.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 22d1760a4278..98c4f28ad2a1 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -546,11 +546,13 @@ static ssize_t timeout_store(struct class *class, struct class_attribute *attr,
546 546
547 return count; 547 return count;
548} 548}
549static CLASS_ATTR_RW(timeout);
549 550
550static struct class_attribute firmware_class_attrs[] = { 551static struct attribute *firmware_class_attrs[] = {
551 __ATTR_RW(timeout), 552 &class_attr_timeout.attr,
552 __ATTR_NULL 553 NULL,
553}; 554};
555ATTRIBUTE_GROUPS(firmware_class);
554 556
555static void fw_dev_release(struct device *dev) 557static void fw_dev_release(struct device *dev)
556{ 558{
@@ -585,7 +587,7 @@ static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env)
585 587
586static struct class firmware_class = { 588static struct class firmware_class = {
587 .name = "firmware", 589 .name = "firmware",
588 .class_attrs = firmware_class_attrs, 590 .class_groups = firmware_class_groups,
589 .dev_uevent = firmware_uevent, 591 .dev_uevent = firmware_uevent,
590 .dev_release = fw_dev_release, 592 .dev_release = fw_dev_release,
591}; 593};