diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-12-21 19:01:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-21 19:01:38 -0500 |
commit | 4a858cfc9af87cc60b3113c3b7b377a4305eac6a (patch) | |
tree | 22ab8aa44aab760d2e1afcb8559e4debe6092d28 /arch/arm/mach-s3c2410/s3c2410.c | |
parent | 8f1e938db9230d9f828420adea96f691c722e473 (diff) |
arm: convert sysdev_class to a regular subsystem
After all sysdev classes are ported to regular driver core entities, the
sysdev implementation will be entirely removed from the kernel.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Boojin Kim <boojin.kim@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-s3c2410/s3c2410.c')
-rw-r--r-- | arch/arm/mach-s3c2410/s3c2410.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index 3d7ebc557a7..da6651556eb 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/sysdev.h> | 21 | #include <linux/device.h> |
22 | #include <linux/syscore_ops.h> | 22 | #include <linux/syscore_ops.h> |
23 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
@@ -131,22 +131,24 @@ void __init s3c2410_init_clocks(int xtal) | |||
131 | s3c24xx_register_clock(&s3c2410_armclk); | 131 | s3c24xx_register_clock(&s3c2410_armclk); |
132 | } | 132 | } |
133 | 133 | ||
134 | struct sysdev_class s3c2410_sysclass = { | 134 | struct bus_type s3c2410_subsys = { |
135 | .name = "s3c2410-core", | 135 | .name = "s3c2410-core", |
136 | .dev_name = "s3c2410-core", | ||
136 | }; | 137 | }; |
137 | 138 | ||
138 | /* Note, we would have liked to name this s3c2410-core, but we cannot | 139 | /* Note, we would have liked to name this s3c2410-core, but we cannot |
139 | * register two sysdev_class with the same name. | 140 | * register two subsystems with the same name. |
140 | */ | 141 | */ |
141 | struct sysdev_class s3c2410a_sysclass = { | 142 | struct bus_type s3c2410a_subsys = { |
142 | .name = "s3c2410a-core", | 143 | .name = "s3c2410a-core", |
144 | .dev_name = "s3c2410a-core", | ||
143 | }; | 145 | }; |
144 | 146 | ||
145 | static struct sys_device s3c2410_sysdev = { | 147 | static struct device s3c2410_dev = { |
146 | .cls = &s3c2410_sysclass, | 148 | .bus = &s3c2410_subsys, |
147 | }; | 149 | }; |
148 | 150 | ||
149 | /* need to register class before we actually register the device, and | 151 | /* need to register the subsystem before we actually register the device, and |
150 | * we also need to ensure that it has been initialised before any of the | 152 | * we also need to ensure that it has been initialised before any of the |
151 | * drivers even try to use it (even if not on an s3c2410 based system) | 153 | * drivers even try to use it (even if not on an s3c2410 based system) |
152 | * as a driver which may support both 2410 and 2440 may try and use it. | 154 | * as a driver which may support both 2410 and 2440 may try and use it. |
@@ -154,14 +156,14 @@ static struct sys_device s3c2410_sysdev = { | |||
154 | 156 | ||
155 | static int __init s3c2410_core_init(void) | 157 | static int __init s3c2410_core_init(void) |
156 | { | 158 | { |
157 | return sysdev_class_register(&s3c2410_sysclass); | 159 | return subsys_system_register(&s3c2410_subsys, NULL); |
158 | } | 160 | } |
159 | 161 | ||
160 | core_initcall(s3c2410_core_init); | 162 | core_initcall(s3c2410_core_init); |
161 | 163 | ||
162 | static int __init s3c2410a_core_init(void) | 164 | static int __init s3c2410a_core_init(void) |
163 | { | 165 | { |
164 | return sysdev_class_register(&s3c2410a_sysclass); | 166 | return subsys_system_register(&s3c2410a_subsys, NULL); |
165 | } | 167 | } |
166 | 168 | ||
167 | core_initcall(s3c2410a_core_init); | 169 | core_initcall(s3c2410a_core_init); |
@@ -175,11 +177,11 @@ int __init s3c2410_init(void) | |||
175 | #endif | 177 | #endif |
176 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 178 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
177 | 179 | ||
178 | return sysdev_register(&s3c2410_sysdev); | 180 | return device_register(&s3c2410_dev); |
179 | } | 181 | } |
180 | 182 | ||
181 | int __init s3c2410a_init(void) | 183 | int __init s3c2410a_init(void) |
182 | { | 184 | { |
183 | s3c2410_sysdev.cls = &s3c2410a_sysclass; | 185 | s3c2410_dev.bus = &s3c2410a_subsys; |
184 | return s3c2410_init(); | 186 | return s3c2410_init(); |
185 | } | 187 | } |