Commit 3f214cff authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarLuis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f76d2527
...@@ -546,11 +546,13 @@ static ssize_t timeout_store(struct class *class, struct class_attribute *attr, ...@@ -546,11 +546,13 @@ static ssize_t timeout_store(struct class *class, struct class_attribute *attr,
return count; return count;
} }
static CLASS_ATTR_RW(timeout);
static struct class_attribute firmware_class_attrs[] = { static struct attribute *firmware_class_attrs[] = {
__ATTR_RW(timeout), &class_attr_timeout.attr,
__ATTR_NULL NULL,
}; };
ATTRIBUTE_GROUPS(firmware_class);
static void fw_dev_release(struct device *dev) static void fw_dev_release(struct device *dev)
{ {
...@@ -585,7 +587,7 @@ static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env) ...@@ -585,7 +587,7 @@ static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env)
static struct class firmware_class = { static struct class firmware_class = {
.name = "firmware", .name = "firmware",
.class_attrs = firmware_class_attrs, .class_groups = firmware_class_groups,
.dev_uevent = firmware_uevent, .dev_uevent = firmware_uevent,
.dev_release = fw_dev_release, .dev_release = fw_dev_release,
}; };
......
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