aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/main.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-11-02 08:47:53 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:18 -0500
commit386f275f5d097758f867bc99ddeaeb7a03b6b190 (patch)
treebd27130e78e1aad1ce080f8c8ca76b9166b33ed4 /kernel/power/main.c
parent23b5212cc7422f475b82124334b64277b5b43013 (diff)
Driver Core: switch all dynamic ksets to kobj_sysfs_ops
Switch all dynamically created ksets, that export simple attributes, to kobj_attribute from subsys_attribute. Struct subsys_attribute will be removed. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Mike Halcrow <mhalcrow@us.ibm.com> Cc: Phillip Hellewell <phillip@hellewell.homeip.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r--kernel/power/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index dce2d76d66de..b8139493b856 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -289,7 +289,8 @@ struct kset *power_kset;
289 * proper enumerated value, and initiates a suspend transition. 289 * proper enumerated value, and initiates a suspend transition.
290 */ 290 */
291 291
292static ssize_t state_show(struct kset *kset, char *buf) 292static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr,
293 char *buf)
293{ 294{
294 char *s = buf; 295 char *s = buf;
295#ifdef CONFIG_SUSPEND 296#ifdef CONFIG_SUSPEND
@@ -310,7 +311,8 @@ static ssize_t state_show(struct kset *kset, char *buf)
310 return (s - buf); 311 return (s - buf);
311} 312}
312 313
313static ssize_t state_store(struct kset *kset, const char *buf, size_t n) 314static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,
315 const char *buf, size_t n)
314{ 316{
315#ifdef CONFIG_SUSPEND 317#ifdef CONFIG_SUSPEND
316 suspend_state_t state = PM_SUSPEND_STANDBY; 318 suspend_state_t state = PM_SUSPEND_STANDBY;
@@ -347,13 +349,15 @@ power_attr(state);
347#ifdef CONFIG_PM_TRACE 349#ifdef CONFIG_PM_TRACE
348int pm_trace_enabled; 350int pm_trace_enabled;
349 351
350static ssize_t pm_trace_show(struct kset *kset, char *buf) 352static ssize_t pm_trace_show(struct kobject *kobj, struct kobj_attribute *attr,
353 char *buf)
351{ 354{
352 return sprintf(buf, "%d\n", pm_trace_enabled); 355 return sprintf(buf, "%d\n", pm_trace_enabled);
353} 356}
354 357
355static ssize_t 358static ssize_t
356pm_trace_store(struct kset *kset, const char *buf, size_t n) 359pm_trace_store(struct kobject *kobj, struct kobj_attribute *attr,
360 const char *buf, size_t n)
357{ 361{
358 int val; 362 int val;
359 363