diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-24 18:05:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-20 00:22:34 -0400 |
commit | e80b89a5f1a4db0ce841f9baf2a192b37e8815e1 (patch) | |
tree | c29a9431094f18b19c05d621bcb839d4fc197c6f /drivers/platform | |
parent | 13e2237f36874a7abef44b98969f399127b1917d (diff) |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/wmi.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index b13344c59808..6e02c953d888 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c | |||
@@ -693,11 +693,13 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | |||
693 | 693 | ||
694 | return sprintf(buf, "wmi:%s\n", guid_string); | 694 | return sprintf(buf, "wmi:%s\n", guid_string); |
695 | } | 695 | } |
696 | static DEVICE_ATTR_RO(modalias); | ||
696 | 697 | ||
697 | static struct device_attribute wmi_dev_attrs[] = { | 698 | static struct attribute *wmi_attrs[] = { |
698 | __ATTR_RO(modalias), | 699 | &dev_attr_modalias.attr, |
699 | __ATTR_NULL | 700 | NULL, |
700 | }; | 701 | }; |
702 | ATTRIBUTE_GROUPS(wmi); | ||
701 | 703 | ||
702 | static int wmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env) | 704 | static int wmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env) |
703 | { | 705 | { |
@@ -732,7 +734,7 @@ static struct class wmi_class = { | |||
732 | .name = "wmi", | 734 | .name = "wmi", |
733 | .dev_release = wmi_dev_free, | 735 | .dev_release = wmi_dev_free, |
734 | .dev_uevent = wmi_dev_uevent, | 736 | .dev_uevent = wmi_dev_uevent, |
735 | .dev_attrs = wmi_dev_attrs, | 737 | .dev_groups = wmi_groups, |
736 | }; | 738 | }; |
737 | 739 | ||
738 | static int wmi_create_device(const struct guid_block *gblock, | 740 | static int wmi_create_device(const struct guid_block *gblock, |