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

x86: wmi: convert class code to use dev_groups

The dev_attrs field of struct class is going away soon, dev_groups
should be used instead.  This converts the wmi class code to use the
correct field.

Cc: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 13e2237f
...@@ -693,11 +693,13 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, ...@@ -693,11 +693,13 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
return sprintf(buf, "wmi:%s\n", guid_string); return sprintf(buf, "wmi:%s\n", guid_string);
} }
static DEVICE_ATTR_RO(modalias);
static struct device_attribute wmi_dev_attrs[] = { static struct attribute *wmi_attrs[] = {
__ATTR_RO(modalias), &dev_attr_modalias.attr,
__ATTR_NULL NULL,
}; };
ATTRIBUTE_GROUPS(wmi);
static int wmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env) static int wmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
{ {
...@@ -732,7 +734,7 @@ static struct class wmi_class = { ...@@ -732,7 +734,7 @@ static struct class wmi_class = {
.name = "wmi", .name = "wmi",
.dev_release = wmi_dev_free, .dev_release = wmi_dev_free,
.dev_uevent = wmi_dev_uevent, .dev_uevent = wmi_dev_uevent,
.dev_attrs = wmi_dev_attrs, .dev_groups = wmi_groups,
}; };
static int wmi_create_device(const struct guid_block *gblock, static int wmi_create_device(const struct guid_block *gblock,
......
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