[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1382528255-12781-1-git-send-email-treding@nvidia.com>
Date: Wed, 23 Oct 2013 13:37:35 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Cc: Jacob Pan <jacob.jun.pan@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...dia.com>
---
Compile-tested only.
---
drivers/powercap/powercap_sys.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
index c22fa4c..21814f9 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(
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists