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 /arch | |
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 'arch')
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/vio.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/power.c | 8 | ||||
-rw-r--r-- | arch/s390/kernel/ipl.c | 32 |
4 files changed, 25 insertions, 25 deletions
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 0383ab334270..6f4ea4bda5e0 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -72,12 +72,12 @@ static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE]; | |||
72 | 72 | ||
73 | static unsigned short enable_dyn_sleep = 1; | 73 | static unsigned short enable_dyn_sleep = 1; |
74 | 74 | ||
75 | static ssize_t omap_pm_sleep_while_idle_show(struct subsystem * subsys, char *buf) | 75 | static ssize_t omap_pm_sleep_while_idle_show(struct kset *kset, char *buf) |
76 | { | 76 | { |
77 | return sprintf(buf, "%hu\n", enable_dyn_sleep); | 77 | return sprintf(buf, "%hu\n", enable_dyn_sleep); |
78 | } | 78 | } |
79 | 79 | ||
80 | static ssize_t omap_pm_sleep_while_idle_store(struct subsystem * subsys, | 80 | static ssize_t omap_pm_sleep_while_idle_store(struct kset *kset, |
81 | const char * buf, | 81 | const char * buf, |
82 | size_t n) | 82 | size_t n) |
83 | { | 83 | { |
@@ -100,7 +100,7 @@ static struct subsys_attribute sleep_while_idle_attr = { | |||
100 | .store = omap_pm_sleep_while_idle_store, | 100 | .store = omap_pm_sleep_while_idle_store, |
101 | }; | 101 | }; |
102 | 102 | ||
103 | extern struct subsystem power_subsys; | 103 | extern struct kset power_subsys; |
104 | static void (*omap_sram_idle)(void) = NULL; | 104 | static void (*omap_sram_idle)(void) = NULL; |
105 | static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL; | 105 | static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL; |
106 | 106 | ||
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 9eaefac5053f..b2c1b67a10a7 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <asm/iseries/hv_call_xm.h> | 37 | #include <asm/iseries/hv_call_xm.h> |
38 | #include <asm/iseries/iommu.h> | 38 | #include <asm/iseries/iommu.h> |
39 | 39 | ||
40 | extern struct subsystem devices_subsys; /* needed for vio_find_name() */ | 40 | extern struct kset devices_subsys; /* needed for vio_find_name() */ |
41 | 41 | ||
42 | static struct vio_dev vio_bus_device = { /* fake "parent" device */ | 42 | static struct vio_dev vio_bus_device = { /* fake "parent" device */ |
43 | .name = vio_bus_device.dev.bus_id, | 43 | .name = vio_bus_device.dev.bus_id, |
@@ -427,7 +427,7 @@ static struct vio_dev *vio_find_name(const char *kobj_name) | |||
427 | { | 427 | { |
428 | struct kobject *found; | 428 | struct kobject *found; |
429 | 429 | ||
430 | found = kset_find_obj(&devices_subsys.kset, kobj_name); | 430 | found = kset_find_obj(&devices_subsys, kobj_name); |
431 | if (!found) | 431 | if (!found) |
432 | return NULL; | 432 | return NULL; |
433 | 433 | ||
diff --git a/arch/powerpc/platforms/pseries/power.c b/arch/powerpc/platforms/pseries/power.c index 2624b71df73d..73e69023d90a 100644 --- a/arch/powerpc/platforms/pseries/power.c +++ b/arch/powerpc/platforms/pseries/power.c | |||
@@ -28,13 +28,13 @@ | |||
28 | 28 | ||
29 | unsigned long rtas_poweron_auto; /* default and normal state is 0 */ | 29 | unsigned long rtas_poweron_auto; /* default and normal state is 0 */ |
30 | 30 | ||
31 | static ssize_t auto_poweron_show(struct subsystem *subsys, char *buf) | 31 | static ssize_t auto_poweron_show(struct kset *kset, char *buf) |
32 | { | 32 | { |
33 | return sprintf(buf, "%lu\n", rtas_poweron_auto); | 33 | return sprintf(buf, "%lu\n", rtas_poweron_auto); |
34 | } | 34 | } |
35 | 35 | ||
36 | static ssize_t | 36 | static ssize_t |
37 | auto_poweron_store(struct subsystem *subsys, const char *buf, size_t n) | 37 | auto_poweron_store(struct kset *kset, const char *buf, size_t n) |
38 | { | 38 | { |
39 | int ret; | 39 | int ret; |
40 | unsigned long ups_restart; | 40 | unsigned long ups_restart; |
@@ -72,12 +72,12 @@ static int __init pm_init(void) | |||
72 | { | 72 | { |
73 | int error = subsystem_register(&power_subsys); | 73 | int error = subsystem_register(&power_subsys); |
74 | if (!error) | 74 | if (!error) |
75 | error = sysfs_create_group(&power_subsys.kset.kobj,&attr_group); | 75 | error = sysfs_create_group(&power_subsys.kobj, &attr_group); |
76 | return error; | 76 | return error; |
77 | } | 77 | } |
78 | core_initcall(pm_init); | 78 | core_initcall(pm_init); |
79 | #else | 79 | #else |
80 | extern struct subsystem power_subsys; | 80 | extern struct kset power_subsys; |
81 | 81 | ||
82 | static int __init apo_pm_init(void) | 82 | static int __init apo_pm_init(void) |
83 | { | 83 | { |
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 06833ac2b115..0ea048d350d8 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -164,7 +164,7 @@ EXPORT_SYMBOL_GPL(diag308); | |||
164 | /* SYSFS */ | 164 | /* SYSFS */ |
165 | 165 | ||
166 | #define DEFINE_IPL_ATTR_RO(_prefix, _name, _format, _value) \ | 166 | #define DEFINE_IPL_ATTR_RO(_prefix, _name, _format, _value) \ |
167 | static ssize_t sys_##_prefix##_##_name##_show(struct subsystem *subsys, \ | 167 | static ssize_t sys_##_prefix##_##_name##_show(struct kset *kset, \ |
168 | char *page) \ | 168 | char *page) \ |
169 | { \ | 169 | { \ |
170 | return sprintf(page, _format, _value); \ | 170 | return sprintf(page, _format, _value); \ |
@@ -173,13 +173,13 @@ static struct subsys_attribute sys_##_prefix##_##_name##_attr = \ | |||
173 | __ATTR(_name, S_IRUGO, sys_##_prefix##_##_name##_show, NULL); | 173 | __ATTR(_name, S_IRUGO, sys_##_prefix##_##_name##_show, NULL); |
174 | 174 | ||
175 | #define DEFINE_IPL_ATTR_RW(_prefix, _name, _fmt_out, _fmt_in, _value) \ | 175 | #define DEFINE_IPL_ATTR_RW(_prefix, _name, _fmt_out, _fmt_in, _value) \ |
176 | static ssize_t sys_##_prefix##_##_name##_show(struct subsystem *subsys, \ | 176 | static ssize_t sys_##_prefix##_##_name##_show(struct kset *kset, \ |
177 | char *page) \ | 177 | char *page) \ |
178 | { \ | 178 | { \ |
179 | return sprintf(page, _fmt_out, \ | 179 | return sprintf(page, _fmt_out, \ |
180 | (unsigned long long) _value); \ | 180 | (unsigned long long) _value); \ |
181 | } \ | 181 | } \ |
182 | static ssize_t sys_##_prefix##_##_name##_store(struct subsystem *subsys,\ | 182 | static ssize_t sys_##_prefix##_##_name##_store(struct kset *kset, \ |
183 | const char *buf, size_t len) \ | 183 | const char *buf, size_t len) \ |
184 | { \ | 184 | { \ |
185 | unsigned long long value; \ | 185 | unsigned long long value; \ |
@@ -194,12 +194,12 @@ static struct subsys_attribute sys_##_prefix##_##_name##_attr = \ | |||
194 | sys_##_prefix##_##_name##_store); | 194 | sys_##_prefix##_##_name##_store); |
195 | 195 | ||
196 | #define DEFINE_IPL_ATTR_STR_RW(_prefix, _name, _fmt_out, _fmt_in, _value)\ | 196 | #define DEFINE_IPL_ATTR_STR_RW(_prefix, _name, _fmt_out, _fmt_in, _value)\ |
197 | static ssize_t sys_##_prefix##_##_name##_show(struct subsystem *subsys, \ | 197 | static ssize_t sys_##_prefix##_##_name##_show(struct kset *kset, \ |
198 | char *page) \ | 198 | char *page) \ |
199 | { \ | 199 | { \ |
200 | return sprintf(page, _fmt_out, _value); \ | 200 | return sprintf(page, _fmt_out, _value); \ |
201 | } \ | 201 | } \ |
202 | static ssize_t sys_##_prefix##_##_name##_store(struct subsystem *subsys,\ | 202 | static ssize_t sys_##_prefix##_##_name##_store(struct kset *kset, \ |
203 | const char *buf, size_t len) \ | 203 | const char *buf, size_t len) \ |
204 | { \ | 204 | { \ |
205 | if (sscanf(buf, _fmt_in, _value) != 1) \ | 205 | if (sscanf(buf, _fmt_in, _value) != 1) \ |
@@ -272,14 +272,14 @@ void __init setup_ipl_info(void) | |||
272 | struct ipl_info ipl_info; | 272 | struct ipl_info ipl_info; |
273 | EXPORT_SYMBOL_GPL(ipl_info); | 273 | EXPORT_SYMBOL_GPL(ipl_info); |
274 | 274 | ||
275 | static ssize_t ipl_type_show(struct subsystem *subsys, char *page) | 275 | static ssize_t ipl_type_show(struct kset *kset, char *page) |
276 | { | 276 | { |
277 | return sprintf(page, "%s\n", ipl_type_str(ipl_info.type)); | 277 | return sprintf(page, "%s\n", ipl_type_str(ipl_info.type)); |
278 | } | 278 | } |
279 | 279 | ||
280 | static struct subsys_attribute sys_ipl_type_attr = __ATTR_RO(ipl_type); | 280 | static struct subsys_attribute sys_ipl_type_attr = __ATTR_RO(ipl_type); |
281 | 281 | ||
282 | static ssize_t sys_ipl_device_show(struct subsystem *subsys, char *page) | 282 | static ssize_t sys_ipl_device_show(struct kset *kset, char *page) |
283 | { | 283 | { |
284 | struct ipl_parameter_block *ipl = IPL_PARMBLOCK_START; | 284 | struct ipl_parameter_block *ipl = IPL_PARMBLOCK_START; |
285 | 285 | ||
@@ -371,7 +371,7 @@ static struct attribute_group ipl_fcp_attr_group = { | |||
371 | 371 | ||
372 | /* CCW ipl device attributes */ | 372 | /* CCW ipl device attributes */ |
373 | 373 | ||
374 | static ssize_t ipl_ccw_loadparm_show(struct subsystem *subsys, char *page) | 374 | static ssize_t ipl_ccw_loadparm_show(struct kset *kset, char *page) |
375 | { | 375 | { |
376 | char loadparm[LOADPARM_LEN + 1] = {}; | 376 | char loadparm[LOADPARM_LEN + 1] = {}; |
377 | 377 | ||
@@ -469,7 +469,7 @@ static void reipl_get_ascii_loadparm(char *loadparm) | |||
469 | strstrip(loadparm); | 469 | strstrip(loadparm); |
470 | } | 470 | } |
471 | 471 | ||
472 | static ssize_t reipl_ccw_loadparm_show(struct subsystem *subsys, char *page) | 472 | static ssize_t reipl_ccw_loadparm_show(struct kset *kset, char *page) |
473 | { | 473 | { |
474 | char buf[LOADPARM_LEN + 1]; | 474 | char buf[LOADPARM_LEN + 1]; |
475 | 475 | ||
@@ -477,7 +477,7 @@ static ssize_t reipl_ccw_loadparm_show(struct subsystem *subsys, char *page) | |||
477 | return sprintf(page, "%s\n", buf); | 477 | return sprintf(page, "%s\n", buf); |
478 | } | 478 | } |
479 | 479 | ||
480 | static ssize_t reipl_ccw_loadparm_store(struct subsystem *subsys, | 480 | static ssize_t reipl_ccw_loadparm_store(struct kset *kset, |
481 | const char *buf, size_t len) | 481 | const char *buf, size_t len) |
482 | { | 482 | { |
483 | int i, lp_len; | 483 | int i, lp_len; |
@@ -572,12 +572,12 @@ static int reipl_set_type(enum ipl_type type) | |||
572 | return 0; | 572 | return 0; |
573 | } | 573 | } |
574 | 574 | ||
575 | static ssize_t reipl_type_show(struct subsystem *subsys, char *page) | 575 | static ssize_t reipl_type_show(struct kset *kset, char *page) |
576 | { | 576 | { |
577 | return sprintf(page, "%s\n", ipl_type_str(reipl_type)); | 577 | return sprintf(page, "%s\n", ipl_type_str(reipl_type)); |
578 | } | 578 | } |
579 | 579 | ||
580 | static ssize_t reipl_type_store(struct subsystem *subsys, const char *buf, | 580 | static ssize_t reipl_type_store(struct kset *kset, const char *buf, |
581 | size_t len) | 581 | size_t len) |
582 | { | 582 | { |
583 | int rc = -EINVAL; | 583 | int rc = -EINVAL; |
@@ -665,12 +665,12 @@ static int dump_set_type(enum dump_type type) | |||
665 | return 0; | 665 | return 0; |
666 | } | 666 | } |
667 | 667 | ||
668 | static ssize_t dump_type_show(struct subsystem *subsys, char *page) | 668 | static ssize_t dump_type_show(struct kset *kset, char *page) |
669 | { | 669 | { |
670 | return sprintf(page, "%s\n", dump_type_str(dump_type)); | 670 | return sprintf(page, "%s\n", dump_type_str(dump_type)); |
671 | } | 671 | } |
672 | 672 | ||
673 | static ssize_t dump_type_store(struct subsystem *subsys, const char *buf, | 673 | static ssize_t dump_type_store(struct kset *kset, const char *buf, |
674 | size_t len) | 674 | size_t len) |
675 | { | 675 | { |
676 | int rc = -EINVAL; | 676 | int rc = -EINVAL; |
@@ -697,12 +697,12 @@ static decl_subsys(shutdown_actions, NULL, NULL); | |||
697 | 697 | ||
698 | /* on panic */ | 698 | /* on panic */ |
699 | 699 | ||
700 | static ssize_t on_panic_show(struct subsystem *subsys, char *page) | 700 | static ssize_t on_panic_show(struct kset *kset, char *page) |
701 | { | 701 | { |
702 | return sprintf(page, "%s\n", shutdown_action_str(on_panic_action)); | 702 | return sprintf(page, "%s\n", shutdown_action_str(on_panic_action)); |
703 | } | 703 | } |
704 | 704 | ||
705 | static ssize_t on_panic_store(struct subsystem *subsys, const char *buf, | 705 | static ssize_t on_panic_store(struct kset *kset, const char *buf, |
706 | size_t len) | 706 | size_t len) |
707 | { | 707 | { |
708 | if (strncmp(buf, SHUTDOWN_REIPL_STR, strlen(SHUTDOWN_REIPL_STR)) == 0) | 708 | if (strncmp(buf, SHUTDOWN_REIPL_STR, strlen(SHUTDOWN_REIPL_STR)) == 0) |