diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-13 16:15:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-02 21:57:59 -0400 |
commit | 823bccfc4002296ba88c3ad0f049e1abd8108d30 (patch) | |
tree | 5338ae0b32409446af4cd00c5107d9405d5bf0b6 /kernel/power | |
parent | 2609e7b9bebfd433254c02538ba803dc516ff674 (diff) |
remove "struct subsystem" as it is no longer needed
We need to work on cleaning up the relationship between kobjects, ksets and
ktypes. The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.
Thanks to Kay for fixing the bugs in this patch.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/disk.c | 14 | ||||
-rw-r--r-- | kernel/power/main.c | 10 | ||||
-rw-r--r-- | kernel/power/power.h | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 02e4fb69111a..8df51c23bba4 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -322,13 +322,13 @@ static const char * const pm_disk_modes[] = { | |||
322 | * supports it (as determined from pm_ops->pm_disk_mode). | 322 | * supports it (as determined from pm_ops->pm_disk_mode). |
323 | */ | 323 | */ |
324 | 324 | ||
325 | static ssize_t disk_show(struct subsystem * subsys, char * buf) | 325 | static ssize_t disk_show(struct kset *kset, char *buf) |
326 | { | 326 | { |
327 | return sprintf(buf, "%s\n", pm_disk_modes[pm_disk_mode]); | 327 | return sprintf(buf, "%s\n", pm_disk_modes[pm_disk_mode]); |
328 | } | 328 | } |
329 | 329 | ||
330 | 330 | ||
331 | static ssize_t disk_store(struct subsystem * s, const char * buf, size_t n) | 331 | static ssize_t disk_store(struct kset *kset, const char *buf, size_t n) |
332 | { | 332 | { |
333 | int error = 0; | 333 | int error = 0; |
334 | int i; | 334 | int i; |
@@ -373,13 +373,13 @@ static ssize_t disk_store(struct subsystem * s, const char * buf, size_t n) | |||
373 | 373 | ||
374 | power_attr(disk); | 374 | power_attr(disk); |
375 | 375 | ||
376 | static ssize_t resume_show(struct subsystem * subsys, char *buf) | 376 | static ssize_t resume_show(struct kset *kset, char *buf) |
377 | { | 377 | { |
378 | return sprintf(buf,"%d:%d\n", MAJOR(swsusp_resume_device), | 378 | return sprintf(buf,"%d:%d\n", MAJOR(swsusp_resume_device), |
379 | MINOR(swsusp_resume_device)); | 379 | MINOR(swsusp_resume_device)); |
380 | } | 380 | } |
381 | 381 | ||
382 | static ssize_t resume_store(struct subsystem *subsys, const char *buf, size_t n) | 382 | static ssize_t resume_store(struct kset *kset, const char *buf, size_t n) |
383 | { | 383 | { |
384 | unsigned int maj, min; | 384 | unsigned int maj, min; |
385 | dev_t res; | 385 | dev_t res; |
@@ -405,12 +405,12 @@ static ssize_t resume_store(struct subsystem *subsys, const char *buf, size_t n) | |||
405 | 405 | ||
406 | power_attr(resume); | 406 | power_attr(resume); |
407 | 407 | ||
408 | static ssize_t image_size_show(struct subsystem * subsys, char *buf) | 408 | static ssize_t image_size_show(struct kset *kset, char *buf) |
409 | { | 409 | { |
410 | return sprintf(buf, "%lu\n", image_size); | 410 | return sprintf(buf, "%lu\n", image_size); |
411 | } | 411 | } |
412 | 412 | ||
413 | static ssize_t image_size_store(struct subsystem * subsys, const char * buf, size_t n) | 413 | static ssize_t image_size_store(struct kset *kset, const char *buf, size_t n) |
414 | { | 414 | { |
415 | unsigned long size; | 415 | unsigned long size; |
416 | 416 | ||
@@ -439,7 +439,7 @@ static struct attribute_group attr_group = { | |||
439 | 439 | ||
440 | static int __init pm_disk_init(void) | 440 | static int __init pm_disk_init(void) |
441 | { | 441 | { |
442 | return sysfs_create_group(&power_subsys.kset.kobj,&attr_group); | 442 | return sysfs_create_group(&power_subsys.kobj, &attr_group); |
443 | } | 443 | } |
444 | 444 | ||
445 | core_initcall(pm_disk_init); | 445 | core_initcall(pm_disk_init); |
diff --git a/kernel/power/main.c b/kernel/power/main.c index 72419a3b1beb..b21c2a56f960 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -285,7 +285,7 @@ decl_subsys(power,NULL,NULL); | |||
285 | * proper enumerated value, and initiates a suspend transition. | 285 | * proper enumerated value, and initiates a suspend transition. |
286 | */ | 286 | */ |
287 | 287 | ||
288 | static ssize_t state_show(struct subsystem * subsys, char * buf) | 288 | static ssize_t state_show(struct kset *kset, char *buf) |
289 | { | 289 | { |
290 | int i; | 290 | int i; |
291 | char * s = buf; | 291 | char * s = buf; |
@@ -298,7 +298,7 @@ static ssize_t state_show(struct subsystem * subsys, char * buf) | |||
298 | return (s - buf); | 298 | return (s - buf); |
299 | } | 299 | } |
300 | 300 | ||
301 | static ssize_t state_store(struct subsystem * subsys, const char * buf, size_t n) | 301 | static ssize_t state_store(struct kset *kset, const char *buf, size_t n) |
302 | { | 302 | { |
303 | suspend_state_t state = PM_SUSPEND_STANDBY; | 303 | suspend_state_t state = PM_SUSPEND_STANDBY; |
304 | const char * const *s; | 304 | const char * const *s; |
@@ -325,13 +325,13 @@ power_attr(state); | |||
325 | #ifdef CONFIG_PM_TRACE | 325 | #ifdef CONFIG_PM_TRACE |
326 | int pm_trace_enabled; | 326 | int pm_trace_enabled; |
327 | 327 | ||
328 | static ssize_t pm_trace_show(struct subsystem * subsys, char * buf) | 328 | static ssize_t pm_trace_show(struct kset *kset, char *buf) |
329 | { | 329 | { |
330 | return sprintf(buf, "%d\n", pm_trace_enabled); | 330 | return sprintf(buf, "%d\n", pm_trace_enabled); |
331 | } | 331 | } |
332 | 332 | ||
333 | static ssize_t | 333 | static ssize_t |
334 | pm_trace_store(struct subsystem * subsys, const char * buf, size_t n) | 334 | pm_trace_store(struct kset *kset, const char *buf, size_t n) |
335 | { | 335 | { |
336 | int val; | 336 | int val; |
337 | 337 | ||
@@ -365,7 +365,7 @@ static int __init pm_init(void) | |||
365 | { | 365 | { |
366 | int error = subsystem_register(&power_subsys); | 366 | int error = subsystem_register(&power_subsys); |
367 | if (!error) | 367 | if (!error) |
368 | error = sysfs_create_group(&power_subsys.kset.kobj,&attr_group); | 368 | error = sysfs_create_group(&power_subsys.kobj,&attr_group); |
369 | return error; | 369 | return error; |
370 | } | 370 | } |
371 | 371 | ||
diff --git a/kernel/power/power.h b/kernel/power/power.h index eb461b816bf4..5f842c3efc4b 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h | |||
@@ -35,7 +35,7 @@ static struct subsys_attribute _name##_attr = { \ | |||
35 | .store = _name##_store, \ | 35 | .store = _name##_store, \ |
36 | } | 36 | } |
37 | 37 | ||
38 | extern struct subsystem power_subsys; | 38 | extern struct kset power_subsys; |
39 | 39 | ||
40 | /* References to section boundaries */ | 40 | /* References to section boundaries */ |
41 | extern const void __nosave_begin, __nosave_end; | 41 | extern const void __nosave_begin, __nosave_end; |