diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2013-10-23 13:37:35 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-25 23:16:31 +0200 |
commit | 9e3410b764b79670a59d6c1ccdcad483b92c058c (patch) | |
tree | 318deaefe03908066f3967f3f4dea39ce9a08242 /drivers/powercap | |
parent | 2d281d8196e38dd3a4ee9af26621ddde8329f269 (diff) |
PowerCap: Convert class code to use dev_groups
The newly added power capping framework uses the obsolete .dev_attrs
field of struct class. However this field will be removed in 3.13, so
convert the code to use the .dev_groups field instead.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/powercap')
-rw-r--r-- | drivers/powercap/powercap_sys.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c index c22fa4c78eaa..21814f90a44b 100644 --- a/drivers/powercap/powercap_sys.c +++ b/drivers/powercap/powercap_sys.c @@ -472,16 +472,18 @@ static ssize_t enabled_store(struct device *dev, return -ENOSYS; } -static struct device_attribute powercap_def_attrs[] = { - __ATTR(enabled, S_IWUSR | S_IRUGO, enabled_show, - enabled_store), - __ATTR_NULL +static DEVICE_ATTR_RW(enabled); + +static struct attribute *powercap_attrs[] = { + &dev_attr_enabled.attr, + NULL, }; +ATTRIBUTE_GROUPS(powercap); static struct class powercap_class = { .name = "powercap", .dev_release = powercap_release, - .dev_attrs = powercap_def_attrs, + .dev_groups = powercap_groups, }; struct powercap_zone *powercap_register_zone( |