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-s3c2412 | |
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-s3c2412')
-rw-r--r-- | arch/arm/mach-s3c2412/cpu-freq.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/dma.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/irq.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/pm.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/s3c2412.c | 15 |
5 files changed, 36 insertions, 28 deletions
diff --git a/arch/arm/mach-s3c2412/cpu-freq.c b/arch/arm/mach-s3c2412/cpu-freq.c index eb3ea1721335..d8664b7652ce 100644 --- a/arch/arm/mach-s3c2412/cpu-freq.c +++ b/arch/arm/mach-s3c2412/cpu-freq.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/cpufreq.h> | 18 | #include <linux/cpufreq.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/device.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
@@ -194,7 +194,7 @@ static struct s3c_cpufreq_info s3c2412_cpufreq_info = { | |||
194 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs), | 194 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs), |
195 | }; | 195 | }; |
196 | 196 | ||
197 | static int s3c2412_cpufreq_add(struct sys_device *sysdev) | 197 | static int s3c2412_cpufreq_add(struct device *dev) |
198 | { | 198 | { |
199 | unsigned long fclk_rate; | 199 | unsigned long fclk_rate; |
200 | 200 | ||
@@ -244,14 +244,15 @@ err_fclk: | |||
244 | return -ENOENT; | 244 | return -ENOENT; |
245 | } | 245 | } |
246 | 246 | ||
247 | static struct sysdev_driver s3c2412_cpufreq_driver = { | 247 | static struct subsys_interface s3c2412_cpufreq_interface = { |
248 | .add = s3c2412_cpufreq_add, | 248 | .name = "s3c2412_cpufreq", |
249 | .subsys = &s3c2412_subsys, | ||
250 | .add_dev = s3c2412_cpufreq_add, | ||
249 | }; | 251 | }; |
250 | 252 | ||
251 | static int s3c2412_cpufreq_init(void) | 253 | static int s3c2412_cpufreq_init(void) |
252 | { | 254 | { |
253 | return sysdev_driver_register(&s3c2412_sysclass, | 255 | return subsys_interface_register(&s3c2412_cpufreq_interface); |
254 | &s3c2412_cpufreq_driver); | ||
255 | } | 256 | } |
256 | 257 | ||
257 | arch_initcall(s3c2412_cpufreq_init); | 258 | arch_initcall(s3c2412_cpufreq_init); |
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c index d2a7d5ef3e67..142acd3b5e15 100644 --- a/arch/arm/mach-s3c2412/dma.c +++ b/arch/arm/mach-s3c2412/dma.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/device.h> |
18 | #include <linux/serial_core.h> | 18 | #include <linux/serial_core.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
@@ -159,19 +159,21 @@ static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = { | |||
159 | .map_size = ARRAY_SIZE(s3c2412_dma_mappings), | 159 | .map_size = ARRAY_SIZE(s3c2412_dma_mappings), |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static int __init s3c2412_dma_add(struct sys_device *sysdev) | 162 | static int __init s3c2412_dma_add(struct device *dev) |
163 | { | 163 | { |
164 | s3c2410_dma_init(); | 164 | s3c2410_dma_init(); |
165 | return s3c24xx_dma_init_map(&s3c2412_dma_sel); | 165 | return s3c24xx_dma_init_map(&s3c2412_dma_sel); |
166 | } | 166 | } |
167 | 167 | ||
168 | static struct sysdev_driver s3c2412_dma_driver = { | 168 | static struct subsys_interface s3c2412_dma_interface = { |
169 | .add = s3c2412_dma_add, | 169 | .name = "s3c2412_dma", |
170 | .subsys = &s3c2412_subsys, | ||
171 | .add_dev = s3c2412_dma_add, | ||
170 | }; | 172 | }; |
171 | 173 | ||
172 | static int __init s3c2412_dma_init(void) | 174 | static int __init s3c2412_dma_init(void) |
173 | { | 175 | { |
174 | return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_dma_driver); | 176 | return subsys_interface_register(&s3c2412_dma_interface); |
175 | } | 177 | } |
176 | 178 | ||
177 | arch_initcall(s3c2412_dma_init); | 179 | arch_initcall(s3c2412_dma_init); |
diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c index 1a1aa220972b..a8a46c1644f4 100644 --- a/arch/arm/mach-s3c2412/irq.c +++ b/arch/arm/mach-s3c2412/irq.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/sysdev.h> | 26 | #include <linux/device.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | 28 | ||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
@@ -170,7 +170,7 @@ static int s3c2412_irq_rtc_wake(struct irq_data *data, unsigned int state) | |||
170 | 170 | ||
171 | static struct irq_chip s3c2412_irq_rtc_chip; | 171 | static struct irq_chip s3c2412_irq_rtc_chip; |
172 | 172 | ||
173 | static int s3c2412_irq_add(struct sys_device *sysdev) | 173 | static int s3c2412_irq_add(struct device *dev) |
174 | { | 174 | { |
175 | unsigned int irqno; | 175 | unsigned int irqno; |
176 | 176 | ||
@@ -200,13 +200,15 @@ static int s3c2412_irq_add(struct sys_device *sysdev) | |||
200 | return 0; | 200 | return 0; |
201 | } | 201 | } |
202 | 202 | ||
203 | static struct sysdev_driver s3c2412_irq_driver = { | 203 | static struct subsys_interface s3c2412_irq_interface = { |
204 | .add = s3c2412_irq_add, | 204 | .name = "s3c2412_irq", |
205 | .subsys = &s3c2412_subsys, | ||
206 | .add_dev = s3c2412_irq_add, | ||
205 | }; | 207 | }; |
206 | 208 | ||
207 | static int s3c2412_irq_init(void) | 209 | static int s3c2412_irq_init(void) |
208 | { | 210 | { |
209 | return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_irq_driver); | 211 | return subsys_interface_register(&s3c2412_irq_interface); |
210 | } | 212 | } |
211 | 213 | ||
212 | arch_initcall(s3c2412_irq_init); | 214 | arch_initcall(s3c2412_irq_init); |
diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c index f4077efa51fa..fd7210d74db9 100644 --- a/arch/arm/mach-s3c2412/pm.c +++ b/arch/arm/mach-s3c2412/pm.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/device.h> |
20 | #include <linux/syscore_ops.h> | 20 | #include <linux/syscore_ops.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
@@ -56,7 +56,7 @@ static void s3c2412_pm_prepare(void) | |||
56 | { | 56 | { |
57 | } | 57 | } |
58 | 58 | ||
59 | static int s3c2412_pm_add(struct sys_device *sysdev) | 59 | static int s3c2412_pm_add(struct device *dev) |
60 | { | 60 | { |
61 | pm_cpu_prep = s3c2412_pm_prepare; | 61 | pm_cpu_prep = s3c2412_pm_prepare; |
62 | pm_cpu_sleep = s3c2412_cpu_suspend; | 62 | pm_cpu_sleep = s3c2412_cpu_suspend; |
@@ -87,13 +87,15 @@ static struct sleep_save s3c2412_sleep[] = { | |||
87 | SAVE_ITEM(S3C2413_GPJSLPCON), | 87 | SAVE_ITEM(S3C2413_GPJSLPCON), |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static struct sysdev_driver s3c2412_pm_driver = { | 90 | static struct subsys_interface s3c2412_pm_interface = { |
91 | .add = s3c2412_pm_add, | 91 | .name = "s3c2412_pm", |
92 | .subsys = &s3c2412_subsys, | ||
93 | .add_dev = s3c2412_pm_add, | ||
92 | }; | 94 | }; |
93 | 95 | ||
94 | static __init int s3c2412_pm_init(void) | 96 | static __init int s3c2412_pm_init(void) |
95 | { | 97 | { |
96 | return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_pm_driver); | 98 | return subsys_interface_register_register(&s3c2412_pm_interface); |
97 | } | 99 | } |
98 | 100 | ||
99 | arch_initcall(s3c2412_pm_init); | 101 | arch_initcall(s3c2412_pm_init); |
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c index 57a1e01e4e50..6c7253ffc5bc 100644 --- a/arch/arm/mach-s3c2412/s3c2412.c +++ b/arch/arm/mach-s3c2412/s3c2412.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.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> |
@@ -220,25 +220,26 @@ void __init s3c2412_init_clocks(int xtal) | |||
220 | s3c2412_baseclk_add(); | 220 | s3c2412_baseclk_add(); |
221 | } | 221 | } |
222 | 222 | ||
223 | /* need to register class before we actually register the device, and | 223 | /* need to register the subsystem before we actually register the device, and |
224 | * we also need to ensure that it has been initialised before any of the | 224 | * we also need to ensure that it has been initialised before any of the |
225 | * drivers even try to use it (even if not on an s3c2412 based system) | 225 | * drivers even try to use it (even if not on an s3c2412 based system) |
226 | * as a driver which may support both 2410 and 2440 may try and use it. | 226 | * as a driver which may support both 2410 and 2440 may try and use it. |
227 | */ | 227 | */ |
228 | 228 | ||
229 | struct sysdev_class s3c2412_sysclass = { | 229 | struct bus_type s3c2412_subsys = { |
230 | .name = "s3c2412-core", | 230 | .name = "s3c2412-core", |
231 | .dev_name = "s3c2412-core", | ||
231 | }; | 232 | }; |
232 | 233 | ||
233 | static int __init s3c2412_core_init(void) | 234 | static int __init s3c2412_core_init(void) |
234 | { | 235 | { |
235 | return sysdev_class_register(&s3c2412_sysclass); | 236 | return subsys_system_register(&s3c2412_subsys, NULL); |
236 | } | 237 | } |
237 | 238 | ||
238 | core_initcall(s3c2412_core_init); | 239 | core_initcall(s3c2412_core_init); |
239 | 240 | ||
240 | static struct sys_device s3c2412_sysdev = { | 241 | static struct device s3c2412_dev = { |
241 | .cls = &s3c2412_sysclass, | 242 | .bus = &s3c2412_subsys, |
242 | }; | 243 | }; |
243 | 244 | ||
244 | int __init s3c2412_init(void) | 245 | int __init s3c2412_init(void) |
@@ -250,5 +251,5 @@ int __init s3c2412_init(void) | |||
250 | #endif | 251 | #endif |
251 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 252 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
252 | 253 | ||
253 | return sysdev_register(&s3c2412_sysdev); | 254 | return device_register(&s3c2412_dev); |
254 | } | 255 | } |