Skip to content

Commit

Permalink
x86: wmi: convert class code to use dev_groups
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Aug 20, 2013
1 parent 13e2237 commit e80b89a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/platform/x86/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,13 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,

return sprintf(buf, "wmi:%s\n", guid_string);
}
static DEVICE_ATTR_RO(modalias);

static struct device_attribute wmi_dev_attrs[] = {
__ATTR_RO(modalias),
__ATTR_NULL
static struct attribute *wmi_attrs[] = {
&dev_attr_modalias.attr,
NULL,
};
ATTRIBUTE_GROUPS(wmi);

static int wmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
{
Expand Down Expand Up @@ -732,7 +734,7 @@ static struct class wmi_class = {
.name = "wmi",
.dev_release = wmi_dev_free,
.dev_uevent = wmi_dev_uevent,
.dev_attrs = wmi_dev_attrs,
.dev_groups = wmi_groups,
};

static int wmi_create_device(const struct guid_block *gblock,
Expand Down

0 comments on commit e80b89a

Please sign in to comment.