]> git.karo-electronics.de Git - linux-beck.git/commitdiff
driver core: firmware_class: convert to use class_groups
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Nov 2016 15:42:30 +0000 (16:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2016 20:12:12 +0000 (21:12 +0100)
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>
drivers/base/firmware_class.c

index 22d1760a42789f869d06d4036315c7e0f2026363..98c4f28ad2a1e7fe0512628d85994d0f362ecd51 100644 (file)
@@ -546,11 +546,13 @@ static ssize_t timeout_store(struct class *class, struct class_attribute *attr,
 
        return count;
 }
+static CLASS_ATTR_RW(timeout);
 
-static struct class_attribute firmware_class_attrs[] = {
-       __ATTR_RW(timeout),
-       __ATTR_NULL
+static struct attribute *firmware_class_attrs[] = {
+       &class_attr_timeout.attr,
+       NULL,
 };
+ATTRIBUTE_GROUPS(firmware_class);
 
 static void fw_dev_release(struct device *dev)
 {
@@ -585,7 +587,7 @@ static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env)
 
 static struct class firmware_class = {
        .name           = "firmware",
-       .class_attrs    = firmware_class_attrs,
+       .class_groups   = firmware_class_groups,
        .dev_uevent     = firmware_uevent,
        .dev_release    = fw_dev_release,
 };