diff options
Diffstat (limited to 'arch/arm')
86 files changed, 412 insertions, 345 deletions
diff --git a/arch/arm/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h index d5adaae5ee2c..f73c908b7fa0 100644 --- a/arch/arm/include/asm/mach/time.h +++ b/arch/arm/include/asm/mach/time.h | |||
@@ -10,8 +10,6 @@ | |||
10 | #ifndef __ASM_ARM_MACH_TIME_H | 10 | #ifndef __ASM_ARM_MACH_TIME_H |
11 | #define __ASM_ARM_MACH_TIME_H | 11 | #define __ASM_ARM_MACH_TIME_H |
12 | 12 | ||
13 | #include <linux/sysdev.h> | ||
14 | |||
15 | /* | 13 | /* |
16 | * This is our kernel timer structure. | 14 | * This is our kernel timer structure. |
17 | * | 15 | * |
diff --git a/arch/arm/kernel/leds.c b/arch/arm/kernel/leds.c index 0bcd38341573..1911dae19e4f 100644 --- a/arch/arm/kernel/leds.c +++ b/arch/arm/kernel/leds.c | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/export.h> | 10 | #include <linux/export.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/sysdev.h> | 12 | #include <linux/device.h> |
13 | #include <linux/syscore_ops.h> | 13 | #include <linux/syscore_ops.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | 15 | ||
@@ -34,8 +34,8 @@ static const struct leds_evt_name evt_names[] = { | |||
34 | { "red", led_red_on, led_red_off }, | 34 | { "red", led_red_on, led_red_off }, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static ssize_t leds_store(struct sys_device *dev, | 37 | static ssize_t leds_store(struct device *dev, |
38 | struct sysdev_attribute *attr, | 38 | struct device_attribute *attr, |
39 | const char *buf, size_t size) | 39 | const char *buf, size_t size) |
40 | { | 40 | { |
41 | int ret = -EINVAL, len = strcspn(buf, " "); | 41 | int ret = -EINVAL, len = strcspn(buf, " "); |
@@ -69,15 +69,16 @@ static ssize_t leds_store(struct sys_device *dev, | |||
69 | return ret; | 69 | return ret; |
70 | } | 70 | } |
71 | 71 | ||
72 | static SYSDEV_ATTR(event, 0200, NULL, leds_store); | 72 | static DEVICE_ATTR(event, 0200, NULL, leds_store); |
73 | 73 | ||
74 | static struct sysdev_class leds_sysclass = { | 74 | static struct bus_type leds_subsys = { |
75 | .name = "leds", | 75 | .name = "leds", |
76 | .dev_name = "leds", | ||
76 | }; | 77 | }; |
77 | 78 | ||
78 | static struct sys_device leds_device = { | 79 | static struct device leds_device = { |
79 | .id = 0, | 80 | .id = 0, |
80 | .cls = &leds_sysclass, | 81 | .bus = &leds_subsys, |
81 | }; | 82 | }; |
82 | 83 | ||
83 | static int leds_suspend(void) | 84 | static int leds_suspend(void) |
@@ -105,11 +106,11 @@ static struct syscore_ops leds_syscore_ops = { | |||
105 | static int __init leds_init(void) | 106 | static int __init leds_init(void) |
106 | { | 107 | { |
107 | int ret; | 108 | int ret; |
108 | ret = sysdev_class_register(&leds_sysclass); | 109 | ret = subsys_system_register(&leds_subsys, NULL); |
109 | if (ret == 0) | 110 | if (ret == 0) |
110 | ret = sysdev_register(&leds_device); | 111 | ret = device_register(&leds_device); |
111 | if (ret == 0) | 112 | if (ret == 0) |
112 | ret = sysdev_create_file(&leds_device, &attr_event); | 113 | ret = device_create_file(&leds_device, &dev_attr_event); |
113 | if (ret == 0) | 114 | if (ret == 0) |
114 | register_syscore_ops(&leds_syscore_ops); | 115 | register_syscore_ops(&leds_syscore_ops); |
115 | return ret; | 116 | return ret; |
diff --git a/arch/arm/mach-bcmring/core.c b/arch/arm/mach-bcmring/core.c index 430da120a297..6b67b7e8426c 100644 --- a/arch/arm/mach-bcmring/core.c +++ b/arch/arm/mach-bcmring/core.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/dma-mapping.h> | 26 | #include <linux/dma-mapping.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/sysdev.h> | ||
29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
30 | #include <linux/amba/bus.h> | 29 | #include <linux/amba/bus.h> |
31 | #include <linux/clkdev.h> | 30 | #include <linux/clkdev.h> |
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index d2acb0f948c6..b6ac6ee658c0 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/sysdev.h> | 16 | #include <linux/device.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
@@ -423,17 +423,18 @@ void __init exynos4_init_irq(void) | |||
423 | s5p_init_irq(NULL, 0); | 423 | s5p_init_irq(NULL, 0); |
424 | } | 424 | } |
425 | 425 | ||
426 | struct sysdev_class exynos4_sysclass = { | 426 | struct bus_type exynos4_subsys = { |
427 | .name = "exynos4-core", | 427 | .name = "exynos4-core", |
428 | .dev_name = "exynos4-core", | ||
428 | }; | 429 | }; |
429 | 430 | ||
430 | static struct sys_device exynos4_sysdev = { | 431 | static struct device exynos4_dev = { |
431 | .cls = &exynos4_sysclass, | 432 | .bus = &exynos4_subsys, |
432 | }; | 433 | }; |
433 | 434 | ||
434 | static int __init exynos4_core_init(void) | 435 | static int __init exynos4_core_init(void) |
435 | { | 436 | { |
436 | return sysdev_class_register(&exynos4_sysclass); | 437 | return subsys_system_register(&exynos4_subsys, NULL); |
437 | } | 438 | } |
438 | core_initcall(exynos4_core_init); | 439 | core_initcall(exynos4_core_init); |
439 | 440 | ||
@@ -470,7 +471,7 @@ int __init exynos_init(void) | |||
470 | /* set idle function */ | 471 | /* set idle function */ |
471 | pm_idle = exynos_idle; | 472 | pm_idle = exynos_idle; |
472 | 473 | ||
473 | return sysdev_register(&exynos4_sysdev); | 474 | return device_register(&exynos4_dev); |
474 | } | 475 | } |
475 | 476 | ||
476 | static struct s3c24xx_uart_clksrc exynos4_serial_clocks[] = { | 477 | static struct s3c24xx_uart_clksrc exynos4_serial_clocks[] = { |
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 509a435afd4b..c4f792dcad19 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c | |||
@@ -205,7 +205,7 @@ static void exynos4_pm_prepare(void) | |||
205 | 205 | ||
206 | } | 206 | } |
207 | 207 | ||
208 | static int exynos4_pm_add(struct sys_device *sysdev) | 208 | static int exynos4_pm_add(struct device *dev) |
209 | { | 209 | { |
210 | pm_cpu_prep = exynos4_pm_prepare; | 210 | pm_cpu_prep = exynos4_pm_prepare; |
211 | pm_cpu_sleep = exynos4_cpu_suspend; | 211 | pm_cpu_sleep = exynos4_cpu_suspend; |
@@ -301,8 +301,10 @@ static void exynos4_restore_pll(void) | |||
301 | } while (epll_wait || vpll_wait); | 301 | } while (epll_wait || vpll_wait); |
302 | } | 302 | } |
303 | 303 | ||
304 | static struct sysdev_driver exynos4_pm_driver = { | 304 | static struct subsys_interface exynos4_pm_interface = { |
305 | .add = exynos4_pm_add, | 305 | .name = "exynos4_pm", |
306 | .subsys = &exynos4_subsys, | ||
307 | .add_dev = exynos4_pm_add, | ||
306 | }; | 308 | }; |
307 | 309 | ||
308 | static __init int exynos4_pm_drvinit(void) | 310 | static __init int exynos4_pm_drvinit(void) |
@@ -325,7 +327,7 @@ static __init int exynos4_pm_drvinit(void) | |||
325 | clk_put(pll_base); | 327 | clk_put(pll_base); |
326 | } | 328 | } |
327 | 329 | ||
328 | return sysdev_driver_register(&exynos4_sysclass, &exynos4_pm_driver); | 330 | return subsys_interface_register(&exynos4_pm_interface); |
329 | } | 331 | } |
330 | arch_initcall(exynos4_pm_drvinit); | 332 | arch_initcall(exynos4_pm_drvinit); |
331 | 333 | ||
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 3a730d447c9a..a8b6aa6003f3 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/device.h> |
18 | #include <linux/amba/bus.h> | 18 | #include <linux/amba/bus.h> |
19 | #include <linux/amba/kmi.h> | 19 | #include <linux/amba/kmi.h> |
20 | #include <linux/amba/clcd.h> | 20 | #include <linux/amba/clcd.h> |
diff --git a/arch/arm/mach-ks8695/irq.c b/arch/arm/mach-ks8695/irq.c index a78092dcd6fb..76802aac0f45 100644 --- a/arch/arm/mach-ks8695/irq.c +++ b/arch/arm/mach-ks8695/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> |
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index ecb94114c81b..bfee5b455105 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/sysdev.h> | 21 | #include <linux/device.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c index 32b465763dbd..97b8191d9d38 100644 --- a/arch/arm/mach-msm/board-sapphire.c +++ b/arch/arm/mach-msm/board-sapphire.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/input.h> | 18 | #include <linux/input.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/sysdev.h> | 21 | #include <linux/device.h> |
22 | 22 | ||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | 24 | ||
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index d5ed5d4f77d6..acd329afc3ac 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/dma-mapping.h> | 23 | #include <linux/dma-mapping.h> |
24 | #include <linux/sysdev.h> | 24 | #include <linux/device.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/amba/bus.h> | 26 | #include <linux/amba/bus.h> |
27 | #include <linux/amba/clcd.h> | 27 | #include <linux/amba/clcd.h> |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index f92a920cf507..0069561464f9 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/sysdev.h> | 24 | #include <linux/device.h> |
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 8ec37b29e0fa..8fe395568a47 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/sysdev.h> | 24 | #include <linux/device.h> |
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index f035fda8b619..34a26011bb89 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/sysdev.h> | 24 | #include <linux/device.h> |
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index 0109c8b440cc..d26a6def1d65 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/sysdev.h> | 24 | #include <linux/device.h> |
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index 0194b3e26dc1..a250fb4124bf 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/sysdev.h> | 23 | #include <linux/device.h> |
24 | #include <linux/amba/bus.h> | 24 | #include <linux/amba/bus.h> |
25 | #include <linux/amba/pl061.h> | 25 | #include <linux/amba/pl061.h> |
26 | #include <linux/amba/mmci.h> | 26 | #include <linux/amba/mmci.h> |
diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c index bc53d2d16d1a..ac7b2ad5c405 100644 --- a/arch/arm/mach-s3c2410/bast-irq.c +++ b/arch/arm/mach-s3c2410/bast-irq.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/ioport.h> | 26 | #include <linux/ioport.h> |
27 | #include <linux/sysdev.h> | 27 | #include <linux/device.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | 29 | ||
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-s3c2410/cpu-freq.c b/arch/arm/mach-s3c2410/cpu-freq.c index 75189df995ae..7dc6c46b5e2b 100644 --- a/arch/arm/mach-s3c2410/cpu-freq.c +++ b/arch/arm/mach-s3c2410/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/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
@@ -115,24 +115,25 @@ static struct s3c_cpufreq_info s3c2410_cpufreq_info = { | |||
115 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), | 115 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), |
116 | }; | 116 | }; |
117 | 117 | ||
118 | static int s3c2410_cpufreq_add(struct sys_device *sysdev) | 118 | static int s3c2410_cpufreq_add(struct device *dev) |
119 | { | 119 | { |
120 | return s3c_cpufreq_register(&s3c2410_cpufreq_info); | 120 | return s3c_cpufreq_register(&s3c2410_cpufreq_info); |
121 | } | 121 | } |
122 | 122 | ||
123 | static struct sysdev_driver s3c2410_cpufreq_driver = { | 123 | static struct subsys_interface s3c2410_cpufreq_interface = { |
124 | .add = s3c2410_cpufreq_add, | 124 | .name = "s3c2410_cpufreq", |
125 | .subsys = &s3c2410_subsys, | ||
126 | .add_dev = s3c2410_cpufreq_add, | ||
125 | }; | 127 | }; |
126 | 128 | ||
127 | static int __init s3c2410_cpufreq_init(void) | 129 | static int __init s3c2410_cpufreq_init(void) |
128 | { | 130 | { |
129 | return sysdev_driver_register(&s3c2410_sysclass, | 131 | return subsys_interface_register(&s3c2410_cpufreq_interface); |
130 | &s3c2410_cpufreq_driver); | ||
131 | } | 132 | } |
132 | 133 | ||
133 | arch_initcall(s3c2410_cpufreq_init); | 134 | arch_initcall(s3c2410_cpufreq_init); |
134 | 135 | ||
135 | static int s3c2410a_cpufreq_add(struct sys_device *sysdev) | 136 | static int s3c2410a_cpufreq_add(struct device *dev) |
136 | { | 137 | { |
137 | /* alter the maximum freq settings for S3C2410A. If a board knows | 138 | /* alter the maximum freq settings for S3C2410A. If a board knows |
138 | * it only has a maximum of 200, then it should register its own | 139 | * it only has a maximum of 200, then it should register its own |
@@ -143,17 +144,18 @@ static int s3c2410a_cpufreq_add(struct sys_device *sysdev) | |||
143 | s3c2410_cpufreq_info.max.pclk = 66500000; | 144 | s3c2410_cpufreq_info.max.pclk = 66500000; |
144 | s3c2410_cpufreq_info.name = "s3c2410a"; | 145 | s3c2410_cpufreq_info.name = "s3c2410a"; |
145 | 146 | ||
146 | return s3c2410_cpufreq_add(sysdev); | 147 | return s3c2410_cpufreq_add(dev); |
147 | } | 148 | } |
148 | 149 | ||
149 | static struct sysdev_driver s3c2410a_cpufreq_driver = { | 150 | static struct subsys_interface s3c2410a_cpufreq_interface = { |
150 | .add = s3c2410a_cpufreq_add, | 151 | .name = "s3c2410a_cpufreq", |
152 | .subsys = &s3c2410a_subsys, | ||
153 | .add_dev = s3c2410a_cpufreq_add, | ||
151 | }; | 154 | }; |
152 | 155 | ||
153 | static int __init s3c2410a_cpufreq_init(void) | 156 | static int __init s3c2410a_cpufreq_init(void) |
154 | { | 157 | { |
155 | return sysdev_driver_register(&s3c2410a_sysclass, | 158 | return subsys_interface_register(&s3c2410a_cpufreq_interface); |
156 | &s3c2410a_cpufreq_driver); | ||
157 | } | 159 | } |
158 | 160 | ||
159 | arch_initcall(s3c2410a_cpufreq_init); | 161 | arch_initcall(s3c2410a_cpufreq_init); |
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index dbe43df8cfec..2afd00014a77 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/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 | 19 | ||
20 | #include <mach/map.h> | 20 | #include <mach/map.h> |
@@ -132,7 +132,7 @@ static struct s3c24xx_dma_order __initdata s3c2410_dma_order = { | |||
132 | }, | 132 | }, |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static int __init s3c2410_dma_add(struct sys_device *sysdev) | 135 | static int __init s3c2410_dma_add(struct device *dev) |
136 | { | 136 | { |
137 | s3c2410_dma_init(); | 137 | s3c2410_dma_init(); |
138 | s3c24xx_dma_order_set(&s3c2410_dma_order); | 138 | s3c24xx_dma_order_set(&s3c2410_dma_order); |
@@ -140,24 +140,28 @@ static int __init s3c2410_dma_add(struct sys_device *sysdev) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | #if defined(CONFIG_CPU_S3C2410) | 142 | #if defined(CONFIG_CPU_S3C2410) |
143 | static struct sysdev_driver s3c2410_dma_driver = { | 143 | static struct subsys_interface s3c2410_dma_interface = { |
144 | .add = s3c2410_dma_add, | 144 | .name = "s3c2410_dma", |
145 | .subsys = &s3c2410_subsys, | ||
146 | .add_dev = s3c2410_dma_add, | ||
145 | }; | 147 | }; |
146 | 148 | ||
147 | static int __init s3c2410_dma_drvinit(void) | 149 | static int __init s3c2410_dma_drvinit(void) |
148 | { | 150 | { |
149 | return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_dma_driver); | 151 | return subsys_interface_register(&s3c2410_interface); |
150 | } | 152 | } |
151 | 153 | ||
152 | arch_initcall(s3c2410_dma_drvinit); | 154 | arch_initcall(s3c2410_dma_drvinit); |
153 | 155 | ||
154 | static struct sysdev_driver s3c2410a_dma_driver = { | 156 | static struct subsys_interface s3c2410a_dma_interface = { |
155 | .add = s3c2410_dma_add, | 157 | .name = "s3c2410a_dma", |
158 | .subsys = &s3c2410a_subsys, | ||
159 | .add_dev = s3c2410_dma_add, | ||
156 | }; | 160 | }; |
157 | 161 | ||
158 | static int __init s3c2410a_dma_drvinit(void) | 162 | static int __init s3c2410a_dma_drvinit(void) |
159 | { | 163 | { |
160 | return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_dma_driver); | 164 | return subsys_interface_register(&s3c2410a_dma_interface); |
161 | } | 165 | } |
162 | 166 | ||
163 | arch_initcall(s3c2410a_dma_drvinit); | 167 | arch_initcall(s3c2410a_dma_drvinit); |
@@ -165,13 +169,15 @@ arch_initcall(s3c2410a_dma_drvinit); | |||
165 | 169 | ||
166 | #if defined(CONFIG_CPU_S3C2442) | 170 | #if defined(CONFIG_CPU_S3C2442) |
167 | /* S3C2442 DMA contains the same selection table as the S3C2410 */ | 171 | /* S3C2442 DMA contains the same selection table as the S3C2410 */ |
168 | static struct sysdev_driver s3c2442_dma_driver = { | 172 | static struct subsys_interface s3c2442_dma_interface = { |
169 | .add = s3c2410_dma_add, | 173 | .name = "s3c2442_dma", |
174 | .subsys = &s3c2442_subsys, | ||
175 | .add_dev = s3c2410_dma_add, | ||
170 | }; | 176 | }; |
171 | 177 | ||
172 | static int __init s3c2442_dma_drvinit(void) | 178 | static int __init s3c2442_dma_drvinit(void) |
173 | { | 179 | { |
174 | return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_dma_driver); | 180 | return subsys_interface_register(&s3c2442_dma_interface); |
175 | } | 181 | } |
176 | 182 | ||
177 | arch_initcall(s3c2442_dma_drvinit); | 183 | arch_initcall(s3c2442_dma_drvinit); |
diff --git a/arch/arm/mach-s3c2410/include/mach/dma.h b/arch/arm/mach-s3c2410/include/mach/dma.h index ae8e482b6427..acbdfecd4186 100644 --- a/arch/arm/mach-s3c2410/include/mach/dma.h +++ b/arch/arm/mach-s3c2410/include/mach/dma.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #ifndef __ASM_ARCH_DMA_H | 13 | #ifndef __ASM_ARCH_DMA_H |
14 | #define __ASM_ARCH_DMA_H __FILE__ | 14 | #define __ASM_ARCH_DMA_H __FILE__ |
15 | 15 | ||
16 | #include <linux/sysdev.h> | 16 | #include <linux/device.h> |
17 | 17 | ||
18 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ | 18 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ |
19 | 19 | ||
@@ -202,7 +202,7 @@ struct s3c2410_dma_chan { | |||
202 | struct s3c2410_dma_buf *end; /* end of queue */ | 202 | struct s3c2410_dma_buf *end; /* end of queue */ |
203 | 203 | ||
204 | /* system device */ | 204 | /* system device */ |
205 | struct sys_device dev; | 205 | struct device dev; |
206 | }; | 206 | }; |
207 | 207 | ||
208 | typedef unsigned long dma_device_t; | 208 | typedef unsigned long dma_device_t; |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index ad9d865651d7..41245a603981 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/memblock.h> | 18 | #include <linux/memblock.h> |
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/sysdev.h> | 21 | #include <linux/device.h> |
22 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c index 58f2c17b9f0d..91c16d9d2459 100644 --- a/arch/arm/mach-s3c2410/mach-qt2410.c +++ b/arch/arm/mach-s3c2410/mach-qt2410.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <linux/sysdev.h> | 31 | #include <linux/device.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/serial_core.h> | 33 | #include <linux/serial_core.h> |
34 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
diff --git a/arch/arm/mach-s3c2410/pll.c b/arch/arm/mach-s3c2410/pll.c index 8338865e11c0..c07438bfc99f 100644 --- a/arch/arm/mach-s3c2410/pll.c +++ b/arch/arm/mach-s3c2410/pll.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/sysdev.h> | 28 | #include <linux/device.h> |
29 | #include <linux/list.h> | 29 | #include <linux/list.h> |
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/err.h> | 31 | #include <linux/err.h> |
@@ -66,30 +66,34 @@ static struct cpufreq_frequency_table pll_vals_12MHz[] = { | |||
66 | { .frequency = 270000000, .index = PLLVAL(127, 1, 1), }, | 66 | { .frequency = 270000000, .index = PLLVAL(127, 1, 1), }, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static int s3c2410_plls_add(struct sys_device *dev) | 69 | static int s3c2410_plls_add(struct device *dev) |
70 | { | 70 | { |
71 | return s3c_plltab_register(pll_vals_12MHz, ARRAY_SIZE(pll_vals_12MHz)); | 71 | return s3c_plltab_register(pll_vals_12MHz, ARRAY_SIZE(pll_vals_12MHz)); |
72 | } | 72 | } |
73 | 73 | ||
74 | static struct sysdev_driver s3c2410_plls_drv = { | 74 | static struct subsys_interface s3c2410_plls_interface = { |
75 | .add = s3c2410_plls_add, | 75 | .name = "s3c2410_plls", |
76 | .subsys = &s3c2410_subsys, | ||
77 | .add_dev = s3c2410_plls_add, | ||
76 | }; | 78 | }; |
77 | 79 | ||
78 | static int __init s3c2410_pll_init(void) | 80 | static int __init s3c2410_pll_init(void) |
79 | { | 81 | { |
80 | return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_plls_drv); | 82 | return subsys_interface_register(&s3c2410_plls_interface); |
81 | 83 | ||
82 | } | 84 | } |
83 | 85 | ||
84 | arch_initcall(s3c2410_pll_init); | 86 | arch_initcall(s3c2410_pll_init); |
85 | 87 | ||
86 | static struct sysdev_driver s3c2410a_plls_drv = { | 88 | static struct subsys_interface s3c2410a_plls_interface = { |
87 | .add = s3c2410_plls_add, | 89 | .name = "s3c2410a_plls", |
90 | .subsys = &s3c2410a_subsys, | ||
91 | .add_dev = s3c2410_plls_add, | ||
88 | }; | 92 | }; |
89 | 93 | ||
90 | static int __init s3c2410a_pll_init(void) | 94 | static int __init s3c2410a_pll_init(void) |
91 | { | 95 | { |
92 | return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_plls_drv); | 96 | return subsys_interface_register(&s3c2410a_plls_interface); |
93 | } | 97 | } |
94 | 98 | ||
95 | arch_initcall(s3c2410a_pll_init); | 99 | arch_initcall(s3c2410a_pll_init); |
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c index 4728f9aa7df1..fda5385deff6 100644 --- a/arch/arm/mach-s3c2410/pm.c +++ b/arch/arm/mach-s3c2410/pm.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/suspend.h> | 24 | #include <linux/suspend.h> |
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/time.h> | 26 | #include <linux/time.h> |
27 | #include <linux/sysdev.h> | 27 | #include <linux/device.h> |
28 | #include <linux/syscore_ops.h> | 28 | #include <linux/syscore_ops.h> |
29 | #include <linux/gpio.h> | 29 | #include <linux/gpio.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
@@ -111,7 +111,7 @@ struct syscore_ops s3c2410_pm_syscore_ops = { | |||
111 | .resume = s3c2410_pm_resume, | 111 | .resume = s3c2410_pm_resume, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static int s3c2410_pm_add(struct sys_device *dev) | 114 | static int s3c2410_pm_add(struct device *dev) |
115 | { | 115 | { |
116 | pm_cpu_prep = s3c2410_pm_prepare; | 116 | pm_cpu_prep = s3c2410_pm_prepare; |
117 | pm_cpu_sleep = s3c2410_cpu_suspend; | 117 | pm_cpu_sleep = s3c2410_cpu_suspend; |
@@ -120,52 +120,60 @@ static int s3c2410_pm_add(struct sys_device *dev) | |||
120 | } | 120 | } |
121 | 121 | ||
122 | #if defined(CONFIG_CPU_S3C2410) | 122 | #if defined(CONFIG_CPU_S3C2410) |
123 | static struct sysdev_driver s3c2410_pm_driver = { | 123 | static struct subsys_interface s3c2410_pm_interface = { |
124 | .add = s3c2410_pm_add, | 124 | .name = "s3c2410_pm", |
125 | .subsys = &s3c2410_subsys, | ||
126 | .add_dev = s3c2410_pm_add, | ||
125 | }; | 127 | }; |
126 | 128 | ||
127 | /* register ourselves */ | 129 | /* register ourselves */ |
128 | 130 | ||
129 | static int __init s3c2410_pm_drvinit(void) | 131 | static int __init s3c2410_pm_drvinit(void) |
130 | { | 132 | { |
131 | return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_pm_driver); | 133 | return subsys_interface_register(&s3c2410_pm_interface); |
132 | } | 134 | } |
133 | 135 | ||
134 | arch_initcall(s3c2410_pm_drvinit); | 136 | arch_initcall(s3c2410_pm_drvinit); |
135 | 137 | ||
136 | static struct sysdev_driver s3c2410a_pm_driver = { | 138 | static struct subsys_interface s3c2410a_pm_interface = { |
137 | .add = s3c2410_pm_add, | 139 | .name = "s3c2410a_pm", |
140 | .subsys = &s3c2410a_subsys, | ||
141 | .add_dev = s3c2410_pm_add, | ||
138 | }; | 142 | }; |
139 | 143 | ||
140 | static int __init s3c2410a_pm_drvinit(void) | 144 | static int __init s3c2410a_pm_drvinit(void) |
141 | { | 145 | { |
142 | return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_pm_driver); | 146 | return subsys_interface_register(&s3c2410a_pm_interface); |
143 | } | 147 | } |
144 | 148 | ||
145 | arch_initcall(s3c2410a_pm_drvinit); | 149 | arch_initcall(s3c2410a_pm_drvinit); |
146 | #endif | 150 | #endif |
147 | 151 | ||
148 | #if defined(CONFIG_CPU_S3C2440) | 152 | #if defined(CONFIG_CPU_S3C2440) |
149 | static struct sysdev_driver s3c2440_pm_driver = { | 153 | static struct subsys_interface s3c2440_pm_interface = { |
150 | .add = s3c2410_pm_add, | 154 | .name = "s3c2440_pm", |
155 | .subsys = &s3c2440_subsys, | ||
156 | .add_dev = s3c2410_pm_add, | ||
151 | }; | 157 | }; |
152 | 158 | ||
153 | static int __init s3c2440_pm_drvinit(void) | 159 | static int __init s3c2440_pm_drvinit(void) |
154 | { | 160 | { |
155 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_pm_driver); | 161 | return subsys_interface_register(&s3c2440_pm_interface); |
156 | } | 162 | } |
157 | 163 | ||
158 | arch_initcall(s3c2440_pm_drvinit); | 164 | arch_initcall(s3c2440_pm_drvinit); |
159 | #endif | 165 | #endif |
160 | 166 | ||
161 | #if defined(CONFIG_CPU_S3C2442) | 167 | #if defined(CONFIG_CPU_S3C2442) |
162 | static struct sysdev_driver s3c2442_pm_driver = { | 168 | static struct subsys_interface s3c2442_pm_interface = { |
163 | .add = s3c2410_pm_add, | 169 | .name = "s3c2442_pm", |
170 | .subsys = &s3c2442_subsys, | ||
171 | .add_dev = s3c2410_pm_add, | ||
164 | }; | 172 | }; |
165 | 173 | ||
166 | static int __init s3c2442_pm_drvinit(void) | 174 | static int __init s3c2442_pm_drvinit(void) |
167 | { | 175 | { |
168 | return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_pm_driver); | 176 | return subsys_interface_register(&s3c2442_pm_interface); |
169 | } | 177 | } |
170 | 178 | ||
171 | arch_initcall(s3c2442_pm_drvinit); | 179 | arch_initcall(s3c2442_pm_drvinit); |
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index 489c826e92a7..eea559ec7a58 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> |
@@ -132,22 +132,24 @@ void __init s3c2410_init_clocks(int xtal) | |||
132 | s3c24xx_register_clock(&s3c2410_armclk); | 132 | s3c24xx_register_clock(&s3c2410_armclk); |
133 | } | 133 | } |
134 | 134 | ||
135 | struct sysdev_class s3c2410_sysclass = { | 135 | struct bus_type s3c2410_subsys = { |
136 | .name = "s3c2410-core", | 136 | .name = "s3c2410-core", |
137 | .dev_name = "s3c2410-core", | ||
137 | }; | 138 | }; |
138 | 139 | ||
139 | /* Note, we would have liked to name this s3c2410-core, but we cannot | 140 | /* Note, we would have liked to name this s3c2410-core, but we cannot |
140 | * register two sysdev_class with the same name. | 141 | * register two subsystems with the same name. |
141 | */ | 142 | */ |
142 | struct sysdev_class s3c2410a_sysclass = { | 143 | struct bus_type s3c2410a_subsys = { |
143 | .name = "s3c2410a-core", | 144 | .name = "s3c2410a-core", |
145 | .dev_name = "s3c2410a-core", | ||
144 | }; | 146 | }; |
145 | 147 | ||
146 | static struct sys_device s3c2410_sysdev = { | 148 | static struct device s3c2410_dev = { |
147 | .cls = &s3c2410_sysclass, | 149 | .bus = &s3c2410_subsys, |
148 | }; | 150 | }; |
149 | 151 | ||
150 | /* need to register class before we actually register the device, and | 152 | /* need to register the subsystem before we actually register the device, and |
151 | * we also need to ensure that it has been initialised before any of the | 153 | * we also need to ensure that it has been initialised before any of the |
152 | * drivers even try to use it (even if not on an s3c2410 based system) | 154 | * drivers even try to use it (even if not on an s3c2410 based system) |
153 | * as a driver which may support both 2410 and 2440 may try and use it. | 155 | * as a driver which may support both 2410 and 2440 may try and use it. |
@@ -155,14 +157,14 @@ static struct sys_device s3c2410_sysdev = { | |||
155 | 157 | ||
156 | static int __init s3c2410_core_init(void) | 158 | static int __init s3c2410_core_init(void) |
157 | { | 159 | { |
158 | return sysdev_class_register(&s3c2410_sysclass); | 160 | return subsys_system_register(&s3c2410_subsys, NULL); |
159 | } | 161 | } |
160 | 162 | ||
161 | core_initcall(s3c2410_core_init); | 163 | core_initcall(s3c2410_core_init); |
162 | 164 | ||
163 | static int __init s3c2410a_core_init(void) | 165 | static int __init s3c2410a_core_init(void) |
164 | { | 166 | { |
165 | return sysdev_class_register(&s3c2410a_sysclass); | 167 | return subsys_system_register(&s3c2410a_subsys, NULL); |
166 | } | 168 | } |
167 | 169 | ||
168 | core_initcall(s3c2410a_core_init); | 170 | core_initcall(s3c2410a_core_init); |
@@ -176,12 +178,12 @@ int __init s3c2410_init(void) | |||
176 | #endif | 178 | #endif |
177 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 179 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
178 | 180 | ||
179 | return sysdev_register(&s3c2410_sysdev); | 181 | return device_register(&s3c2410_dev); |
180 | } | 182 | } |
181 | 183 | ||
182 | int __init s3c2410a_init(void) | 184 | int __init s3c2410a_init(void) |
183 | { | 185 | { |
184 | s3c2410_sysdev.cls = &s3c2410a_sysclass; | 186 | s3c2410_dev.bus = &s3c2410a_subsys; |
185 | return s3c2410_init(); | 187 | return s3c2410_init(); |
186 | } | 188 | } |
187 | 189 | ||
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c index 140711db6c89..516881640808 100644 --- a/arch/arm/mach-s3c2412/clock.c +++ b/arch/arm/mach-s3c2412/clock.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/list.h> | 26 | #include <linux/list.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/sysdev.h> | 29 | #include <linux/device.h> |
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
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..d1adfa65f66d 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(&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 867ce2e269f6..aff6e85a97c6 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> |
@@ -218,25 +218,26 @@ void __init s3c2412_init_clocks(int xtal) | |||
218 | s3c2412_baseclk_add(); | 218 | s3c2412_baseclk_add(); |
219 | } | 219 | } |
220 | 220 | ||
221 | /* need to register class before we actually register the device, and | 221 | /* need to register the subsystem before we actually register the device, and |
222 | * we also need to ensure that it has been initialised before any of the | 222 | * we also need to ensure that it has been initialised before any of the |
223 | * drivers even try to use it (even if not on an s3c2412 based system) | 223 | * drivers even try to use it (even if not on an s3c2412 based system) |
224 | * as a driver which may support both 2410 and 2440 may try and use it. | 224 | * as a driver which may support both 2410 and 2440 may try and use it. |
225 | */ | 225 | */ |
226 | 226 | ||
227 | struct sysdev_class s3c2412_sysclass = { | 227 | struct bus_type s3c2412_subsys = { |
228 | .name = "s3c2412-core", | 228 | .name = "s3c2412-core", |
229 | .dev_name = "s3c2412-core", | ||
229 | }; | 230 | }; |
230 | 231 | ||
231 | static int __init s3c2412_core_init(void) | 232 | static int __init s3c2412_core_init(void) |
232 | { | 233 | { |
233 | return sysdev_class_register(&s3c2412_sysclass); | 234 | return subsys_system_register(&s3c2412_subsys, NULL); |
234 | } | 235 | } |
235 | 236 | ||
236 | core_initcall(s3c2412_core_init); | 237 | core_initcall(s3c2412_core_init); |
237 | 238 | ||
238 | static struct sys_device s3c2412_sysdev = { | 239 | static struct device s3c2412_dev = { |
239 | .cls = &s3c2412_sysclass, | 240 | .bus = &s3c2412_subsys, |
240 | }; | 241 | }; |
241 | 242 | ||
242 | int __init s3c2412_init(void) | 243 | int __init s3c2412_init(void) |
@@ -248,5 +249,5 @@ int __init s3c2412_init(void) | |||
248 | #endif | 249 | #endif |
249 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 250 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
250 | 251 | ||
251 | return sysdev_register(&s3c2412_sysdev); | 252 | return device_register(&s3c2412_dev); |
252 | } | 253 | } |
diff --git a/arch/arm/mach-s3c2416/irq.c b/arch/arm/mach-s3c2416/irq.c index 28ad20d42445..36df761061de 100644 --- a/arch/arm/mach-s3c2416/irq.c +++ b/arch/arm/mach-s3c2416/irq.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
28 | #include <linux/sysdev.h> | 28 | #include <linux/device.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | 30 | ||
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
@@ -213,7 +213,7 @@ static int __init s3c2416_add_sub(unsigned int base, | |||
213 | return 0; | 213 | return 0; |
214 | } | 214 | } |
215 | 215 | ||
216 | static int __init s3c2416_irq_add(struct sys_device *sysdev) | 216 | static int __init s3c2416_irq_add(struct device *dev) |
217 | { | 217 | { |
218 | printk(KERN_INFO "S3C2416: IRQ Support\n"); | 218 | printk(KERN_INFO "S3C2416: IRQ Support\n"); |
219 | 219 | ||
@@ -234,13 +234,15 @@ static int __init s3c2416_irq_add(struct sys_device *sysdev) | |||
234 | return 0; | 234 | return 0; |
235 | } | 235 | } |
236 | 236 | ||
237 | static struct sysdev_driver s3c2416_irq_driver = { | 237 | static struct subsys_interface s3c2416_irq_interface = { |
238 | .add = s3c2416_irq_add, | 238 | .name = "s3c2416_irq", |
239 | .subsys = &s3c2416_subsys, | ||
240 | .add_dev = s3c2416_irq_add, | ||
239 | }; | 241 | }; |
240 | 242 | ||
241 | static int __init s3c2416_irq_init(void) | 243 | static int __init s3c2416_irq_init(void) |
242 | { | 244 | { |
243 | return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_irq_driver); | 245 | return subsys_interface_register(&s3c2416_irq_interface); |
244 | } | 246 | } |
245 | 247 | ||
246 | arch_initcall(s3c2416_irq_init); | 248 | arch_initcall(s3c2416_irq_init); |
diff --git a/arch/arm/mach-s3c2416/pm.c b/arch/arm/mach-s3c2416/pm.c index 9ec54f1d8e75..3bdb15a0d419 100644 --- a/arch/arm/mach-s3c2416/pm.c +++ b/arch/arm/mach-s3c2416/pm.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/sysdev.h> | 13 | #include <linux/device.h> |
14 | #include <linux/syscore_ops.h> | 14 | #include <linux/syscore_ops.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | 16 | ||
@@ -48,7 +48,7 @@ static void s3c2416_pm_prepare(void) | |||
48 | __raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1); | 48 | __raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1); |
49 | } | 49 | } |
50 | 50 | ||
51 | static int s3c2416_pm_add(struct sys_device *sysdev) | 51 | static int s3c2416_pm_add(struct device *dev) |
52 | { | 52 | { |
53 | pm_cpu_prep = s3c2416_pm_prepare; | 53 | pm_cpu_prep = s3c2416_pm_prepare; |
54 | pm_cpu_sleep = s3c2416_cpu_suspend; | 54 | pm_cpu_sleep = s3c2416_cpu_suspend; |
@@ -56,13 +56,15 @@ static int s3c2416_pm_add(struct sys_device *sysdev) | |||
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
59 | static struct sysdev_driver s3c2416_pm_driver = { | 59 | static struct subsys_interface s3c2416_pm_interface = { |
60 | .add = s3c2416_pm_add, | 60 | .name = "s3c2416_pm", |
61 | .subsys = &s3c2416_subsys, | ||
62 | .add_dev = s3c2416_pm_add, | ||
61 | }; | 63 | }; |
62 | 64 | ||
63 | static __init int s3c2416_pm_init(void) | 65 | static __init int s3c2416_pm_init(void) |
64 | { | 66 | { |
65 | return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_pm_driver); | 67 | return subsys_interface_register(&s3c2416_pm_interface); |
66 | } | 68 | } |
67 | 69 | ||
68 | arch_initcall(s3c2416_pm_init); | 70 | arch_initcall(s3c2416_pm_init); |
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index 46062232bbc7..5287d2808d3e 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/serial_core.h> | 33 | #include <linux/serial_core.h> |
34 | #include <linux/sysdev.h> | 34 | #include <linux/device.h> |
35 | #include <linux/syscore_ops.h> | 35 | #include <linux/syscore_ops.h> |
36 | #include <linux/clk.h> | 36 | #include <linux/clk.h> |
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
@@ -67,12 +67,13 @@ static struct map_desc s3c2416_iodesc[] __initdata = { | |||
67 | IODESC_ENT(TIMER), | 67 | IODESC_ENT(TIMER), |
68 | }; | 68 | }; |
69 | 69 | ||
70 | struct sysdev_class s3c2416_sysclass = { | 70 | struct bus_type s3c2416_subsys = { |
71 | .name = "s3c2416-core", | 71 | .name = "s3c2416-core", |
72 | .dev_name = "s3c2416-core", | ||
72 | }; | 73 | }; |
73 | 74 | ||
74 | static struct sys_device s3c2416_sysdev = { | 75 | static struct device s3c2416_dev = { |
75 | .cls = &s3c2416_sysclass, | 76 | .bus = &s3c2416_subsys, |
76 | }; | 77 | }; |
77 | 78 | ||
78 | void s3c2416_restart(char mode, const char *cmd) | 79 | void s3c2416_restart(char mode, const char *cmd) |
@@ -106,7 +107,7 @@ int __init s3c2416_init(void) | |||
106 | #endif | 107 | #endif |
107 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 108 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
108 | 109 | ||
109 | return sysdev_register(&s3c2416_sysdev); | 110 | return device_register(&s3c2416_dev); |
110 | } | 111 | } |
111 | 112 | ||
112 | void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) | 113 | void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) |
@@ -134,7 +135,7 @@ void __init s3c2416_map_io(void) | |||
134 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); | 135 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); |
135 | } | 136 | } |
136 | 137 | ||
137 | /* need to register class before we actually register the device, and | 138 | /* need to register the subsystem before we actually register the device, and |
138 | * we also need to ensure that it has been initialised before any of the | 139 | * we also need to ensure that it has been initialised before any of the |
139 | * drivers even try to use it (even if not on an s3c2416 based system) | 140 | * drivers even try to use it (even if not on an s3c2416 based system) |
140 | * as a driver which may support both 2443 and 2440 may try and use it. | 141 | * as a driver which may support both 2443 and 2440 may try and use it. |
@@ -142,7 +143,7 @@ void __init s3c2416_map_io(void) | |||
142 | 143 | ||
143 | static int __init s3c2416_core_init(void) | 144 | static int __init s3c2416_core_init(void) |
144 | { | 145 | { |
145 | return sysdev_class_register(&s3c2416_sysclass); | 146 | return subsys_system_register(&s3c2416_subsys, NULL); |
146 | } | 147 | } |
147 | 148 | ||
148 | core_initcall(s3c2416_core_init); | 149 | core_initcall(s3c2416_core_init); |
diff --git a/arch/arm/mach-s3c2440/clock.c b/arch/arm/mach-s3c2440/clock.c index f9e6bdaf41d2..d8957592fdc4 100644 --- a/arch/arm/mach-s3c2440/clock.c +++ b/arch/arm/mach-s3c2440/clock.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/sysdev.h> | ||
32 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
33 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
34 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
@@ -108,7 +107,7 @@ static struct clk s3c2440_clk_ac97 = { | |||
108 | .ctrlbit = S3C2440_CLKCON_CAMERA, | 107 | .ctrlbit = S3C2440_CLKCON_CAMERA, |
109 | }; | 108 | }; |
110 | 109 | ||
111 | static int s3c2440_clk_add(struct sys_device *sysdev) | 110 | static int s3c2440_clk_add(struct device *dev) |
112 | { | 111 | { |
113 | struct clk *clock_upll; | 112 | struct clk *clock_upll; |
114 | struct clk *clock_h; | 113 | struct clk *clock_h; |
@@ -137,13 +136,15 @@ static int s3c2440_clk_add(struct sys_device *sysdev) | |||
137 | return 0; | 136 | return 0; |
138 | } | 137 | } |
139 | 138 | ||
140 | static struct sysdev_driver s3c2440_clk_driver = { | 139 | static struct subsys_interface s3c2440_clk_interface = { |
141 | .add = s3c2440_clk_add, | 140 | .name = "s3c2440_clk", |
141 | .subsys = &s3c2440_subsys, | ||
142 | .add_dev = s3c2440_clk_add, | ||
142 | }; | 143 | }; |
143 | 144 | ||
144 | static __init int s3c24xx_clk_driver(void) | 145 | static __init int s3c24xx_clk_init(void) |
145 | { | 146 | { |
146 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver); | 147 | return subsys_interface_register(&s3c2440_clk_interface); |
147 | } | 148 | } |
148 | 149 | ||
149 | arch_initcall(s3c24xx_clk_driver); | 150 | arch_initcall(s3c24xx_clk_init); |
diff --git a/arch/arm/mach-s3c2440/dma.c b/arch/arm/mach-s3c2440/dma.c index 0e73f8f9d132..15b1ddf8f626 100644 --- a/arch/arm/mach-s3c2440/dma.c +++ b/arch/arm/mach-s3c2440/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 | 19 | ||
20 | #include <mach/map.h> | 20 | #include <mach/map.h> |
@@ -174,20 +174,22 @@ static struct s3c24xx_dma_order __initdata s3c2440_dma_order = { | |||
174 | }, | 174 | }, |
175 | }; | 175 | }; |
176 | 176 | ||
177 | static int __init s3c2440_dma_add(struct sys_device *sysdev) | 177 | static int __init s3c2440_dma_add(struct device *dev) |
178 | { | 178 | { |
179 | s3c2410_dma_init(); | 179 | s3c2410_dma_init(); |
180 | s3c24xx_dma_order_set(&s3c2440_dma_order); | 180 | s3c24xx_dma_order_set(&s3c2440_dma_order); |
181 | return s3c24xx_dma_init_map(&s3c2440_dma_sel); | 181 | return s3c24xx_dma_init_map(&s3c2440_dma_sel); |
182 | } | 182 | } |
183 | 183 | ||
184 | static struct sysdev_driver s3c2440_dma_driver = { | 184 | static struct subsys_interface s3c2440_dma_interface = { |
185 | .add = s3c2440_dma_add, | 185 | .name = "s3c2440_dma", |
186 | .subsys = &s3c2440_subsys, | ||
187 | .add_dev = s3c2440_dma_add, | ||
186 | }; | 188 | }; |
187 | 189 | ||
188 | static int __init s3c2440_dma_init(void) | 190 | static int __init s3c2440_dma_init(void) |
189 | { | 191 | { |
190 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_dma_driver); | 192 | return subsys_interface_register(&s3c2440_dma_interface); |
191 | } | 193 | } |
192 | 194 | ||
193 | arch_initcall(s3c2440_dma_init); | 195 | arch_initcall(s3c2440_dma_init); |
diff --git a/arch/arm/mach-s3c2440/irq.c b/arch/arm/mach-s3c2440/irq.c index eb1cc0f0705e..4fee9bc6bcb5 100644 --- a/arch/arm/mach-s3c2440/irq.c +++ b/arch/arm/mach-s3c2440/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> |
@@ -92,7 +92,7 @@ static struct irq_chip s3c_irq_wdtac97 = { | |||
92 | .irq_ack = s3c_irq_wdtac97_ack, | 92 | .irq_ack = s3c_irq_wdtac97_ack, |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static int s3c2440_irq_add(struct sys_device *sysdev) | 95 | static int s3c2440_irq_add(struct device *dev) |
96 | { | 96 | { |
97 | unsigned int irqno; | 97 | unsigned int irqno; |
98 | 98 | ||
@@ -113,13 +113,15 @@ static int s3c2440_irq_add(struct sys_device *sysdev) | |||
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | static struct sysdev_driver s3c2440_irq_driver = { | 116 | static struct subsys_interface s3c2440_irq_interface = { |
117 | .add = s3c2440_irq_add, | 117 | .name = "s3c2440_irq", |
118 | .subsys = &s3c2440_subsys, | ||
119 | .add_dev = s3c2440_irq_add, | ||
118 | }; | 120 | }; |
119 | 121 | ||
120 | static int s3c2440_irq_init(void) | 122 | static int s3c2440_irq_init(void) |
121 | { | 123 | { |
122 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); | 124 | return subsys_interface_register(&s3c2440_irq_interface); |
123 | } | 125 | } |
124 | 126 | ||
125 | arch_initcall(s3c2440_irq_init); | 127 | arch_initcall(s3c2440_irq_init); |
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c index 1c50d3e09177..332d7533bd96 100644 --- a/arch/arm/mach-s3c2440/mach-rx1950.c +++ b/arch/arm/mach-s3c2440/mach-rx1950.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/serial_core.h> | 24 | #include <linux/serial_core.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/gpio_keys.h> | 26 | #include <linux/gpio_keys.h> |
27 | #include <linux/sysdev.h> | 27 | #include <linux/device.h> |
28 | #include <linux/pda_power.h> | 28 | #include <linux/pda_power.h> |
29 | #include <linux/pwm_backlight.h> | 29 | #include <linux/pwm_backlight.h> |
30 | #include <linux/pwm.h> | 30 | #include <linux/pwm.h> |
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index 4d20a016b85d..80a0972873c2 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/mach-rx3715.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/tty.h> | 21 | #include <linux/tty.h> |
22 | #include <linux/console.h> | 22 | #include <linux/console.h> |
23 | #include <linux/sysdev.h> | 23 | #include <linux/device.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/serial_core.h> | 25 | #include <linux/serial_core.h> |
26 | #include <linux/serial.h> | 26 | #include <linux/serial.h> |
diff --git a/arch/arm/mach-s3c2440/s3c2440-cpufreq.c b/arch/arm/mach-s3c2440/s3c2440-cpufreq.c index 976002fb1b8f..cf7596694efe 100644 --- a/arch/arm/mach-s3c2440/s3c2440-cpufreq.c +++ b/arch/arm/mach-s3c2440/s3c2440-cpufreq.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/ioport.h> | 18 | #include <linux/ioport.h> |
19 | #include <linux/cpufreq.h> | 19 | #include <linux/cpufreq.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/device.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
@@ -270,7 +270,7 @@ struct s3c_cpufreq_info s3c2440_cpufreq_info = { | |||
270 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), | 270 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), |
271 | }; | 271 | }; |
272 | 272 | ||
273 | static int s3c2440_cpufreq_add(struct sys_device *sysdev) | 273 | static int s3c2440_cpufreq_add(struct device *dev) |
274 | { | 274 | { |
275 | xtal = s3c_cpufreq_clk_get(NULL, "xtal"); | 275 | xtal = s3c_cpufreq_clk_get(NULL, "xtal"); |
276 | hclk = s3c_cpufreq_clk_get(NULL, "hclk"); | 276 | hclk = s3c_cpufreq_clk_get(NULL, "hclk"); |
@@ -285,27 +285,29 @@ static int s3c2440_cpufreq_add(struct sys_device *sysdev) | |||
285 | return s3c_cpufreq_register(&s3c2440_cpufreq_info); | 285 | return s3c_cpufreq_register(&s3c2440_cpufreq_info); |
286 | } | 286 | } |
287 | 287 | ||
288 | static struct sysdev_driver s3c2440_cpufreq_driver = { | 288 | static struct subsys_interface s3c2440_cpufreq_interface = { |
289 | .add = s3c2440_cpufreq_add, | 289 | .name = "s3c2440_cpufreq", |
290 | .subsys = &s3c2440_subsys, | ||
291 | .add_dev = s3c2440_cpufreq_add, | ||
290 | }; | 292 | }; |
291 | 293 | ||
292 | static int s3c2440_cpufreq_init(void) | 294 | static int s3c2440_cpufreq_init(void) |
293 | { | 295 | { |
294 | return sysdev_driver_register(&s3c2440_sysclass, | 296 | return subsys_interface_register(&s3c2440_cpufreq_interface); |
295 | &s3c2440_cpufreq_driver); | ||
296 | } | 297 | } |
297 | 298 | ||
298 | /* arch_initcall adds the clocks we need, so use subsys_initcall. */ | 299 | /* arch_initcall adds the clocks we need, so use subsys_initcall. */ |
299 | subsys_initcall(s3c2440_cpufreq_init); | 300 | subsys_initcall(s3c2440_cpufreq_init); |
300 | 301 | ||
301 | static struct sysdev_driver s3c2442_cpufreq_driver = { | 302 | static struct subsys_interface s3c2442_cpufreq_interface = { |
302 | .add = s3c2440_cpufreq_add, | 303 | .name = "s3c2442_cpufreq", |
304 | .subsys = &s3c2442_subsys, | ||
305 | .add_dev = s3c2440_cpufreq_add, | ||
303 | }; | 306 | }; |
304 | 307 | ||
305 | static int s3c2442_cpufreq_init(void) | 308 | static int s3c2442_cpufreq_init(void) |
306 | { | 309 | { |
307 | return sysdev_driver_register(&s3c2442_sysclass, | 310 | return subsys_interface_register(&s3c2442_cpufreq_interface); |
308 | &s3c2442_cpufreq_driver); | ||
309 | } | 311 | } |
310 | 312 | ||
311 | subsys_initcall(s3c2442_cpufreq_init); | 313 | subsys_initcall(s3c2442_cpufreq_init); |
diff --git a/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c b/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c index f105d5e8c477..b5368ae8d7fe 100644 --- a/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c +++ b/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/device.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | 20 | ||
@@ -51,7 +51,7 @@ static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = { | |||
51 | { .frequency = 400000000, .index = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */ | 51 | { .frequency = 400000000, .index = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */ |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static int s3c2440_plls12_add(struct sys_device *dev) | 54 | static int s3c2440_plls12_add(struct device *dev) |
55 | { | 55 | { |
56 | struct clk *xtal_clk; | 56 | struct clk *xtal_clk; |
57 | unsigned long xtal; | 57 | unsigned long xtal; |
@@ -72,25 +72,29 @@ static int s3c2440_plls12_add(struct sys_device *dev) | |||
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | static struct sysdev_driver s3c2440_plls12_drv = { | 75 | static struct subsys_interface s3c2440_plls12_interface = { |
76 | .add = s3c2440_plls12_add, | 76 | .name = "s3c2440_plls12", |
77 | .subsys = &s3c2440_subsys, | ||
78 | .add_dev = s3c2440_plls12_add, | ||
77 | }; | 79 | }; |
78 | 80 | ||
79 | static int __init s3c2440_pll_12mhz(void) | 81 | static int __init s3c2440_pll_12mhz(void) |
80 | { | 82 | { |
81 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_plls12_drv); | 83 | return subsys_interface_register(&s3c2440_plls12_interface); |
82 | 84 | ||
83 | } | 85 | } |
84 | 86 | ||
85 | arch_initcall(s3c2440_pll_12mhz); | 87 | arch_initcall(s3c2440_pll_12mhz); |
86 | 88 | ||
87 | static struct sysdev_driver s3c2442_plls12_drv = { | 89 | static struct subsys_interface s3c2442_plls12_interface = { |
88 | .add = s3c2440_plls12_add, | 90 | .name = "s3c2442_plls12", |
91 | .subsys = &s3c2442_subsys, | ||
92 | .add_dev = s3c2440_plls12_add, | ||
89 | }; | 93 | }; |
90 | 94 | ||
91 | static int __init s3c2442_pll_12mhz(void) | 95 | static int __init s3c2442_pll_12mhz(void) |
92 | { | 96 | { |
93 | return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_plls12_drv); | 97 | return subsys_interface_register(&s3c2442_plls12_interface); |
94 | 98 | ||
95 | } | 99 | } |
96 | 100 | ||
diff --git a/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c b/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c index c8a8f90ef382..42f2b5cd2399 100644 --- a/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c +++ b/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/device.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | 20 | ||
@@ -79,7 +79,7 @@ static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = { | |||
79 | { .frequency = 402192000, .index = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */ | 79 | { .frequency = 402192000, .index = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */ |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static int s3c2440_plls169344_add(struct sys_device *dev) | 82 | static int s3c2440_plls169344_add(struct device *dev) |
83 | { | 83 | { |
84 | struct clk *xtal_clk; | 84 | struct clk *xtal_clk; |
85 | unsigned long xtal; | 85 | unsigned long xtal; |
@@ -100,28 +100,28 @@ static int s3c2440_plls169344_add(struct sys_device *dev) | |||
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
102 | 102 | ||
103 | static struct sysdev_driver s3c2440_plls169344_drv = { | 103 | static struct subsys_interface s3c2440_plls169344_interface = { |
104 | .add = s3c2440_plls169344_add, | 104 | .name = "s3c2440_plls169344", |
105 | .subsys = &s3c2440_subsys, | ||
106 | .add_dev = s3c2440_plls169344_add, | ||
105 | }; | 107 | }; |
106 | 108 | ||
107 | static int __init s3c2440_pll_16934400(void) | 109 | static int __init s3c2440_pll_16934400(void) |
108 | { | 110 | { |
109 | return sysdev_driver_register(&s3c2440_sysclass, | 111 | return subsys_interface_register(&s3c2440_plls169344_interface); |
110 | &s3c2440_plls169344_drv); | ||
111 | |||
112 | } | 112 | } |
113 | 113 | ||
114 | arch_initcall(s3c2440_pll_16934400); | 114 | arch_initcall(s3c2440_pll_16934400); |
115 | 115 | ||
116 | static struct sysdev_driver s3c2442_plls169344_drv = { | 116 | static struct subsys_interface s3c2442_plls169344_interface = { |
117 | .add = s3c2440_plls169344_add, | 117 | .name = "s3c2442_plls169344", |
118 | .subsys = &s3c2442_subsys, | ||
119 | .add_dev = s3c2440_plls169344_add, | ||
118 | }; | 120 | }; |
119 | 121 | ||
120 | static int __init s3c2442_pll_16934400(void) | 122 | static int __init s3c2442_pll_16934400(void) |
121 | { | 123 | { |
122 | return sysdev_driver_register(&s3c2442_sysclass, | 124 | return subsys_interface_register(&s3c2442_plls169344_interface); |
123 | &s3c2442_plls169344_drv); | ||
124 | |||
125 | } | 125 | } |
126 | 126 | ||
127 | arch_initcall(s3c2442_pll_16934400); | 127 | arch_initcall(s3c2442_pll_16934400); |
diff --git a/arch/arm/mach-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c index 42d73f1e0cef..517623a09fc5 100644 --- a/arch/arm/mach-s3c2440/s3c2440.c +++ b/arch/arm/mach-s3c2440/s3c2440.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.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/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
@@ -41,8 +41,8 @@ | |||
41 | #include <plat/gpio-cfg.h> | 41 | #include <plat/gpio-cfg.h> |
42 | #include <plat/gpio-cfg-helpers.h> | 42 | #include <plat/gpio-cfg-helpers.h> |
43 | 43 | ||
44 | static struct sys_device s3c2440_sysdev = { | 44 | static struct device s3c2440_dev = { |
45 | .cls = &s3c2440_sysclass, | 45 | .bus = &s3c2440_subsys, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | int __init s3c2440_init(void) | 48 | int __init s3c2440_init(void) |
@@ -64,7 +64,7 @@ int __init s3c2440_init(void) | |||
64 | 64 | ||
65 | /* register our system device for everything else */ | 65 | /* register our system device for everything else */ |
66 | 66 | ||
67 | return sysdev_register(&s3c2440_sysdev); | 67 | return device_register(&s3c2440_dev); |
68 | } | 68 | } |
69 | 69 | ||
70 | void __init s3c2440_map_io(void) | 70 | void __init s3c2440_map_io(void) |
diff --git a/arch/arm/mach-s3c2440/s3c2442.c b/arch/arm/mach-s3c2440/s3c2442.c index 2c822e09392f..8004e0497bf4 100644 --- a/arch/arm/mach-s3c2440/s3c2442.c +++ b/arch/arm/mach-s3c2440/s3c2442.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/sysdev.h> | ||
32 | #include <linux/syscore_ops.h> | 31 | #include <linux/syscore_ops.h> |
33 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
34 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
@@ -123,7 +122,7 @@ static struct clk s3c2442_clk_cam_upll = { | |||
123 | }, | 122 | }, |
124 | }; | 123 | }; |
125 | 124 | ||
126 | static int s3c2442_clk_add(struct sys_device *sysdev) | 125 | static int s3c2442_clk_add(struct device *dev) |
127 | { | 126 | { |
128 | struct clk *clock_upll; | 127 | struct clk *clock_upll; |
129 | struct clk *clock_h; | 128 | struct clk *clock_h; |
@@ -149,20 +148,22 @@ static int s3c2442_clk_add(struct sys_device *sysdev) | |||
149 | return 0; | 148 | return 0; |
150 | } | 149 | } |
151 | 150 | ||
152 | static struct sysdev_driver s3c2442_clk_driver = { | 151 | static struct subsys_interface s3c2442_clk_interface = { |
153 | .add = s3c2442_clk_add, | 152 | .name = "s3c2442_clk", |
153 | .subsys = &s3c2442_subsys, | ||
154 | .add_dev = s3c2442_clk_add, | ||
154 | }; | 155 | }; |
155 | 156 | ||
156 | static __init int s3c2442_clk_init(void) | 157 | static __init int s3c2442_clk_init(void) |
157 | { | 158 | { |
158 | return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_clk_driver); | 159 | return subsys_interface_register(&s3c2442_clk_interface); |
159 | } | 160 | } |
160 | 161 | ||
161 | arch_initcall(s3c2442_clk_init); | 162 | arch_initcall(s3c2442_clk_init); |
162 | 163 | ||
163 | 164 | ||
164 | static struct sys_device s3c2442_sysdev = { | 165 | static struct device s3c2442_dev = { |
165 | .cls = &s3c2442_sysclass, | 166 | .bus = &s3c2442_subsys, |
166 | }; | 167 | }; |
167 | 168 | ||
168 | int __init s3c2442_init(void) | 169 | int __init s3c2442_init(void) |
@@ -175,7 +176,7 @@ int __init s3c2442_init(void) | |||
175 | register_syscore_ops(&s3c244x_pm_syscore_ops); | 176 | register_syscore_ops(&s3c244x_pm_syscore_ops); |
176 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 177 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
177 | 178 | ||
178 | return sysdev_register(&s3c2442_sysdev); | 179 | return device_register(&s3c2442_dev); |
179 | } | 180 | } |
180 | 181 | ||
181 | void __init s3c2442_map_io(void) | 182 | void __init s3c2442_map_io(void) |
diff --git a/arch/arm/mach-s3c2440/s3c244x-clock.c b/arch/arm/mach-s3c2440/s3c244x-clock.c index 7f5ea0a169a5..b3fdbdda3d5f 100644 --- a/arch/arm/mach-s3c2440/s3c244x-clock.c +++ b/arch/arm/mach-s3c2440/s3c244x-clock.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/sysdev.h> | ||
32 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
33 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
34 | #include <linux/clk.h> | 33 | #include <linux/clk.h> |
@@ -73,7 +72,7 @@ static struct clk clk_arm = { | |||
73 | }, | 72 | }, |
74 | }; | 73 | }; |
75 | 74 | ||
76 | static int s3c244x_clk_add(struct sys_device *sysdev) | 75 | static int s3c244x_clk_add(struct device *dev) |
77 | { | 76 | { |
78 | unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); | 77 | unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); |
79 | unsigned long clkdivn; | 78 | unsigned long clkdivn; |
@@ -115,24 +114,28 @@ static int s3c244x_clk_add(struct sys_device *sysdev) | |||
115 | return 0; | 114 | return 0; |
116 | } | 115 | } |
117 | 116 | ||
118 | static struct sysdev_driver s3c2440_clk_driver = { | 117 | static struct subsys_interface s3c2440_clk_interface = { |
119 | .add = s3c244x_clk_add, | 118 | .name = "s3c2440_clk", |
119 | .subsys = &s3c2440_subsys, | ||
120 | .add_dev = s3c244x_clk_add, | ||
120 | }; | 121 | }; |
121 | 122 | ||
122 | static int s3c2440_clk_init(void) | 123 | static int s3c2440_clk_init(void) |
123 | { | 124 | { |
124 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver); | 125 | return subsys_interface_register(&s3c2440_clk_interface); |
125 | } | 126 | } |
126 | 127 | ||
127 | arch_initcall(s3c2440_clk_init); | 128 | arch_initcall(s3c2440_clk_init); |
128 | 129 | ||
129 | static struct sysdev_driver s3c2442_clk_driver = { | 130 | static struct subsys_interface s3c2442_clk_interface = { |
130 | .add = s3c244x_clk_add, | 131 | .name = "s3c2442_clk", |
132 | .subsys = &s3c2442_subsys, | ||
133 | .add_dev = s3c244x_clk_add, | ||
131 | }; | 134 | }; |
132 | 135 | ||
133 | static int s3c2442_clk_init(void) | 136 | static int s3c2442_clk_init(void) |
134 | { | 137 | { |
135 | return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_clk_driver); | 138 | return subsys_interface_register(&s3c2442_clk_interface); |
136 | } | 139 | } |
137 | 140 | ||
138 | arch_initcall(s3c2442_clk_init); | 141 | arch_initcall(s3c2442_clk_init); |
diff --git a/arch/arm/mach-s3c2440/s3c244x-irq.c b/arch/arm/mach-s3c2440/s3c244x-irq.c index c63e8f26d901..74d3dcf46a48 100644 --- a/arch/arm/mach-s3c2440/s3c244x-irq.c +++ b/arch/arm/mach-s3c2440/s3c244x-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> |
@@ -91,7 +91,7 @@ static struct irq_chip s3c_irq_cam = { | |||
91 | .irq_ack = s3c_irq_cam_ack, | 91 | .irq_ack = s3c_irq_cam_ack, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static int s3c244x_irq_add(struct sys_device *sysdev) | 94 | static int s3c244x_irq_add(struct device *dev) |
95 | { | 95 | { |
96 | unsigned int irqno; | 96 | unsigned int irqno; |
97 | 97 | ||
@@ -114,25 +114,29 @@ static int s3c244x_irq_add(struct sys_device *sysdev) | |||
114 | return 0; | 114 | return 0; |
115 | } | 115 | } |
116 | 116 | ||
117 | static struct sysdev_driver s3c2440_irq_driver = { | 117 | static struct subsys_interface s3c2440_irq_interface = { |
118 | .add = s3c244x_irq_add, | 118 | .name = "s3c2440_irq", |
119 | .subsys = &s3c2440_subsys, | ||
120 | .add_dev = s3c244x_irq_add, | ||
119 | }; | 121 | }; |
120 | 122 | ||
121 | static int s3c2440_irq_init(void) | 123 | static int s3c2440_irq_init(void) |
122 | { | 124 | { |
123 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); | 125 | return subsys_interface_register(&s3c2440_irq_interface); |
124 | } | 126 | } |
125 | 127 | ||
126 | arch_initcall(s3c2440_irq_init); | 128 | arch_initcall(s3c2440_irq_init); |
127 | 129 | ||
128 | static struct sysdev_driver s3c2442_irq_driver = { | 130 | static struct subsys_interface s3c2442_irq_interface = { |
129 | .add = s3c244x_irq_add, | 131 | .name = "s3c2442_irq", |
132 | .subsys = &s3c2442_subsys, | ||
133 | .add_dev = s3c244x_irq_add, | ||
130 | }; | 134 | }; |
131 | 135 | ||
132 | 136 | ||
133 | static int s3c2442_irq_init(void) | 137 | static int s3c2442_irq_init(void) |
134 | { | 138 | { |
135 | return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver); | 139 | return subsys_interface_register(&s3c2442_irq_interface); |
136 | } | 140 | } |
137 | 141 | ||
138 | arch_initcall(s3c2442_irq_init); | 142 | arch_initcall(s3c2442_irq_init); |
diff --git a/arch/arm/mach-s3c2440/s3c244x.c b/arch/arm/mach-s3c2440/s3c244x.c index 7e8a23d2098a..36bc60f61d0a 100644 --- a/arch/arm/mach-s3c2440/s3c244x.c +++ b/arch/arm/mach-s3c2440/s3c244x.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.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/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
@@ -135,17 +135,19 @@ void __init s3c244x_init_clocks(int xtal) | |||
135 | s3c2410_baseclk_add(); | 135 | s3c2410_baseclk_add(); |
136 | } | 136 | } |
137 | 137 | ||
138 | /* Since the S3C2442 and S3C2440 share items, put both sysclasses here */ | 138 | /* Since the S3C2442 and S3C2440 share items, put both subsystems here */ |
139 | 139 | ||
140 | struct sysdev_class s3c2440_sysclass = { | 140 | struct bus_type s3c2440_subsys = { |
141 | .name = "s3c2440-core", | 141 | .name = "s3c2440-core", |
142 | .dev_name = "s3c2440-core", | ||
142 | }; | 143 | }; |
143 | 144 | ||
144 | struct sysdev_class s3c2442_sysclass = { | 145 | struct bus_type s3c2442_subsys = { |
145 | .name = "s3c2442-core", | 146 | .name = "s3c2442-core", |
147 | .dev_name = "s3c2442-core", | ||
146 | }; | 148 | }; |
147 | 149 | ||
148 | /* need to register class before we actually register the device, and | 150 | /* need to register the subsystem before we actually register the device, and |
149 | * we also need to ensure that it has been initialised before any of the | 151 | * we also need to ensure that it has been initialised before any of the |
150 | * drivers even try to use it (even if not on an s3c2440 based system) | 152 | * drivers even try to use it (even if not on an s3c2440 based system) |
151 | * as a driver which may support both 2410 and 2440 may try and use it. | 153 | * as a driver which may support both 2410 and 2440 may try and use it. |
@@ -153,14 +155,14 @@ struct sysdev_class s3c2442_sysclass = { | |||
153 | 155 | ||
154 | static int __init s3c2440_core_init(void) | 156 | static int __init s3c2440_core_init(void) |
155 | { | 157 | { |
156 | return sysdev_class_register(&s3c2440_sysclass); | 158 | return subsys_system_register(&s3c2440_subsys, NULL); |
157 | } | 159 | } |
158 | 160 | ||
159 | core_initcall(s3c2440_core_init); | 161 | core_initcall(s3c2440_core_init); |
160 | 162 | ||
161 | static int __init s3c2442_core_init(void) | 163 | static int __init s3c2442_core_init(void) |
162 | { | 164 | { |
163 | return sysdev_class_register(&s3c2442_sysclass); | 165 | return subsys_system_register(&s3c2442_subsys, NULL); |
164 | } | 166 | } |
165 | 167 | ||
166 | core_initcall(s3c2442_core_init); | 168 | core_initcall(s3c2442_core_init); |
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index 1c2c088aa2e8..6dde2696f8f0 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/sysdev.h> | 30 | #include <linux/device.h> |
31 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
32 | #include <linux/mutex.h> | 32 | #include <linux/mutex.h> |
33 | #include <linux/serial_core.h> | 33 | #include <linux/serial_core.h> |
diff --git a/arch/arm/mach-s3c2443/dma.c b/arch/arm/mach-s3c2443/dma.c index fe52151d2e84..de6b4a23c9ed 100644 --- a/arch/arm/mach-s3c2443/dma.c +++ b/arch/arm/mach-s3c2443/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 | ||
@@ -135,19 +135,21 @@ static struct s3c24xx_dma_selection __initdata s3c2443_dma_sel = { | |||
135 | .map_size = ARRAY_SIZE(s3c2443_dma_mappings), | 135 | .map_size = ARRAY_SIZE(s3c2443_dma_mappings), |
136 | }; | 136 | }; |
137 | 137 | ||
138 | static int __init s3c2443_dma_add(struct sys_device *sysdev) | 138 | static int __init s3c2443_dma_add(struct device *dev) |
139 | { | 139 | { |
140 | s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100); | 140 | s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100); |
141 | return s3c24xx_dma_init_map(&s3c2443_dma_sel); | 141 | return s3c24xx_dma_init_map(&s3c2443_dma_sel); |
142 | } | 142 | } |
143 | 143 | ||
144 | static struct sysdev_driver s3c2443_dma_driver = { | 144 | static struct subsys_interface s3c2443_dma_interface = { |
145 | .add = s3c2443_dma_add, | 145 | .name = "s3c2443_dma", |
146 | .subsys = &s3c2443_subsys, | ||
147 | .add_dev = s3c2443_dma_add, | ||
146 | }; | 148 | }; |
147 | 149 | ||
148 | static int __init s3c2443_dma_init(void) | 150 | static int __init s3c2443_dma_init(void) |
149 | { | 151 | { |
150 | return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_dma_driver); | 152 | return subsys_interface_register(&s3c2443_dma_interface); |
151 | } | 153 | } |
152 | 154 | ||
153 | arch_initcall(s3c2443_dma_init); | 155 | arch_initcall(s3c2443_dma_init); |
diff --git a/arch/arm/mach-s3c2443/irq.c b/arch/arm/mach-s3c2443/irq.c index 83ecb1173fb1..35e4ff24fb43 100644 --- a/arch/arm/mach-s3c2443/irq.c +++ b/arch/arm/mach-s3c2443/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> |
@@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base, | |||
241 | return 0; | 241 | return 0; |
242 | } | 242 | } |
243 | 243 | ||
244 | static int __init s3c2443_irq_add(struct sys_device *sysdev) | 244 | static int __init s3c2443_irq_add(struct device *dev) |
245 | { | 245 | { |
246 | printk("S3C2443: IRQ Support\n"); | 246 | printk("S3C2443: IRQ Support\n"); |
247 | 247 | ||
@@ -265,13 +265,15 @@ static int __init s3c2443_irq_add(struct sys_device *sysdev) | |||
265 | return 0; | 265 | return 0; |
266 | } | 266 | } |
267 | 267 | ||
268 | static struct sysdev_driver s3c2443_irq_driver = { | 268 | static struct subsys_interface s3c2443_irq_interface = { |
269 | .add = s3c2443_irq_add, | 269 | .name = "s3c2443_irq", |
270 | .subsys = &s3c2443_subsys, | ||
271 | .add_dev = s3c2443_irq_add, | ||
270 | }; | 272 | }; |
271 | 273 | ||
272 | static int __init s3c2443_irq_init(void) | 274 | static int __init s3c2443_irq_init(void) |
273 | { | 275 | { |
274 | return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_irq_driver); | 276 | return subsys_interface_register(&s3c2443_irq_interface); |
275 | } | 277 | } |
276 | 278 | ||
277 | arch_initcall(s3c2443_irq_init); | 279 | arch_initcall(s3c2443_irq_init); |
diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c index 4568ded338d0..b9deaeb0dfff 100644 --- a/arch/arm/mach-s3c2443/s3c2443.c +++ b/arch/arm/mach-s3c2443/s3c2443.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
22 | #include <linux/sysdev.h> | 22 | #include <linux/device.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | 25 | ||
@@ -48,12 +48,13 @@ static struct map_desc s3c2443_iodesc[] __initdata = { | |||
48 | IODESC_ENT(TIMER), | 48 | IODESC_ENT(TIMER), |
49 | }; | 49 | }; |
50 | 50 | ||
51 | struct sysdev_class s3c2443_sysclass = { | 51 | struct bus_type s3c2443_subsys = { |
52 | .name = "s3c2443-core", | 52 | .name = "s3c2443-core", |
53 | .dev_name = "s3c2443-core", | ||
53 | }; | 54 | }; |
54 | 55 | ||
55 | static struct sys_device s3c2443_sysdev = { | 56 | static struct device s3c2443_dev = { |
56 | .cls = &s3c2443_sysclass, | 57 | .bus = &s3c2443_subsys, |
57 | }; | 58 | }; |
58 | 59 | ||
59 | void s3c2443_restart(char mode, const char *cmd) | 60 | void s3c2443_restart(char mode, const char *cmd) |
@@ -77,7 +78,7 @@ int __init s3c2443_init(void) | |||
77 | s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT; | 78 | s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT; |
78 | s3c_device_wdt.resource[1].end = IRQ_S3C2443_WDT; | 79 | s3c_device_wdt.resource[1].end = IRQ_S3C2443_WDT; |
79 | 80 | ||
80 | return sysdev_register(&s3c2443_sysdev); | 81 | return device_register(&s3c2443_dev); |
81 | } | 82 | } |
82 | 83 | ||
83 | void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no) | 84 | void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no) |
@@ -99,7 +100,7 @@ void __init s3c2443_map_io(void) | |||
99 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); | 100 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); |
100 | } | 101 | } |
101 | 102 | ||
102 | /* need to register class before we actually register the device, and | 103 | /* need to register the subsystem before we actually register the device, and |
103 | * we also need to ensure that it has been initialised before any of the | 104 | * we also need to ensure that it has been initialised before any of the |
104 | * drivers even try to use it (even if not on an s3c2443 based system) | 105 | * drivers even try to use it (even if not on an s3c2443 based system) |
105 | * as a driver which may support both 2443 and 2440 may try and use it. | 106 | * as a driver which may support both 2443 and 2440 may try and use it. |
@@ -107,7 +108,7 @@ void __init s3c2443_map_io(void) | |||
107 | 108 | ||
108 | static int __init s3c2443_core_init(void) | 109 | static int __init s3c2443_core_init(void) |
109 | { | 110 | { |
110 | return sysdev_class_register(&s3c2443_sysclass); | 111 | return subsys_system_register(&s3c2443_subsys, NULL); |
111 | } | 112 | } |
112 | 113 | ||
113 | core_initcall(s3c2443_core_init); | 114 | core_initcall(s3c2443_core_init); |
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index 35182ba049da..4a7394d4bd9e 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/sysdev.h> | ||
23 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
24 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
25 | #include <linux/io.h> | 24 | #include <linux/io.h> |
@@ -139,12 +138,13 @@ static struct map_desc s3c_iodesc[] __initdata = { | |||
139 | }, | 138 | }, |
140 | }; | 139 | }; |
141 | 140 | ||
142 | struct sysdev_class s3c64xx_sysclass = { | 141 | static struct bus_type s3c64xx_subsys = { |
143 | .name = "s3c64xx-core", | 142 | .name = "s3c64xx-core", |
143 | .dev_name = "s3c64xx-core", | ||
144 | }; | 144 | }; |
145 | 145 | ||
146 | static struct sys_device s3c64xx_sysdev = { | 146 | static struct device s3c64xx_dev = { |
147 | .cls = &s3c64xx_sysclass, | 147 | .bus = &s3c64xx_subsys, |
148 | }; | 148 | }; |
149 | 149 | ||
150 | /* read cpu identification code */ | 150 | /* read cpu identification code */ |
@@ -162,12 +162,12 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | |||
162 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); | 162 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); |
163 | } | 163 | } |
164 | 164 | ||
165 | static __init int s3c64xx_sysdev_init(void) | 165 | static __init int s3c64xx_dev_init(void) |
166 | { | 166 | { |
167 | sysdev_class_register(&s3c64xx_sysclass); | 167 | subsys_system_register(&s3c64xx_subsys, NULL); |
168 | return sysdev_register(&s3c64xx_sysdev); | 168 | return device_register(&s3c64xx_dev); |
169 | } | 169 | } |
170 | core_initcall(s3c64xx_sysdev_init); | 170 | core_initcall(s3c64xx_dev_init); |
171 | 171 | ||
172 | /* | 172 | /* |
173 | * setup the sources the vic should advertise resume | 173 | * setup the sources the vic should advertise resume |
diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h index 8dc8ab6d8d6d..5eb9c9a7d73b 100644 --- a/arch/arm/mach-s3c64xx/common.h +++ b/arch/arm/mach-s3c64xx/common.h | |||
@@ -26,7 +26,6 @@ void s3c64xx_setup_clocks(void); | |||
26 | void s3c64xx_restart(char mode, const char *cmd); | 26 | void s3c64xx_restart(char mode, const char *cmd); |
27 | 27 | ||
28 | extern struct syscore_ops s3c64xx_irq_syscore_ops; | 28 | extern struct syscore_ops s3c64xx_irq_syscore_ops; |
29 | extern struct sysdev_class s3c64xx_sysclass; | ||
30 | 29 | ||
31 | #ifdef CONFIG_CPU_S3C6400 | 30 | #ifdef CONFIG_CPU_S3C6400 |
32 | 31 | ||
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index 17d62f4f8204..f2a7a1725596 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/dmapool.h> | 18 | #include <linux/dmapool.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/device.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
@@ -35,7 +35,7 @@ | |||
35 | /* dma channel state information */ | 35 | /* dma channel state information */ |
36 | 36 | ||
37 | struct s3c64xx_dmac { | 37 | struct s3c64xx_dmac { |
38 | struct sys_device sysdev; | 38 | struct device dev; |
39 | struct clk *clk; | 39 | struct clk *clk; |
40 | void __iomem *regs; | 40 | void __iomem *regs; |
41 | struct s3c2410_dma_chan *channels; | 41 | struct s3c2410_dma_chan *channels; |
@@ -631,8 +631,9 @@ static irqreturn_t s3c64xx_dma_irq(int irq, void *pw) | |||
631 | return IRQ_HANDLED; | 631 | return IRQ_HANDLED; |
632 | } | 632 | } |
633 | 633 | ||
634 | static struct sysdev_class dma_sysclass = { | 634 | static struct bus_type dma_subsys = { |
635 | .name = "s3c64xx-dma", | 635 | .name = "s3c64xx-dma", |
636 | .dev_name = "s3c64xx-dma", | ||
636 | }; | 637 | }; |
637 | 638 | ||
638 | static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, | 639 | static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, |
@@ -651,12 +652,12 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, | |||
651 | return -ENOMEM; | 652 | return -ENOMEM; |
652 | } | 653 | } |
653 | 654 | ||
654 | dmac->sysdev.id = chno / 8; | 655 | dmac->dev.id = chno / 8; |
655 | dmac->sysdev.cls = &dma_sysclass; | 656 | dmac->dev.bus = &dma_subsys; |
656 | 657 | ||
657 | err = sysdev_register(&dmac->sysdev); | 658 | err = device_register(&dmac->dev); |
658 | if (err) { | 659 | if (err) { |
659 | printk(KERN_ERR "%s: failed to register sysdevice\n", __func__); | 660 | printk(KERN_ERR "%s: failed to register device\n", __func__); |
660 | goto err_alloc; | 661 | goto err_alloc; |
661 | } | 662 | } |
662 | 663 | ||
@@ -667,7 +668,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, | |||
667 | goto err_dev; | 668 | goto err_dev; |
668 | } | 669 | } |
669 | 670 | ||
670 | snprintf(clkname, sizeof(clkname), "dma%d", dmac->sysdev.id); | 671 | snprintf(clkname, sizeof(clkname), "dma%d", dmac->dev.id); |
671 | 672 | ||
672 | dmac->clk = clk_get(NULL, clkname); | 673 | dmac->clk = clk_get(NULL, clkname); |
673 | if (IS_ERR(dmac->clk)) { | 674 | if (IS_ERR(dmac->clk)) { |
@@ -715,7 +716,7 @@ err_clk: | |||
715 | err_map: | 716 | err_map: |
716 | iounmap(regs); | 717 | iounmap(regs); |
717 | err_dev: | 718 | err_dev: |
718 | sysdev_unregister(&dmac->sysdev); | 719 | device_unregister(&dmac->dev); |
719 | err_alloc: | 720 | err_alloc: |
720 | kfree(dmac); | 721 | kfree(dmac); |
721 | return err; | 722 | return err; |
@@ -733,9 +734,9 @@ static int __init s3c64xx_dma_init(void) | |||
733 | return -ENOMEM; | 734 | return -ENOMEM; |
734 | } | 735 | } |
735 | 736 | ||
736 | ret = sysdev_class_register(&dma_sysclass); | 737 | ret = subsys_system_register(&dma_subsys, NULL); |
737 | if (ret) { | 738 | if (ret) { |
738 | printk(KERN_ERR "%s: failed to create sysclass\n", __func__); | 739 | printk(KERN_ERR "%s: failed to create subsys\n", __func__); |
739 | return -ENOMEM; | 740 | return -ENOMEM; |
740 | } | 741 | } |
741 | 742 | ||
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c index b1e1571f2f6b..4869714c6f1b 100644 --- a/arch/arm/mach-s3c64xx/s3c6400.c +++ b/arch/arm/mach-s3c64xx/s3c6400.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/device.h> |
21 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | 23 | ||
@@ -71,17 +71,18 @@ void __init s3c6400_init_irq(void) | |||
71 | s3c64xx_init_irq(~0 & ~(0xf << 5), ~0); | 71 | s3c64xx_init_irq(~0 & ~(0xf << 5), ~0); |
72 | } | 72 | } |
73 | 73 | ||
74 | static struct sysdev_class s3c6400_sysclass = { | 74 | static struct bus_type s3c6400_subsys = { |
75 | .name = "s3c6400-core", | 75 | .name = "s3c6400-core", |
76 | .dev_name = "s3c6400-core", | ||
76 | }; | 77 | }; |
77 | 78 | ||
78 | static struct sys_device s3c6400_sysdev = { | 79 | static struct device s3c6400_dev = { |
79 | .cls = &s3c6400_sysclass, | 80 | .bus = &s3c6400_subsys, |
80 | }; | 81 | }; |
81 | 82 | ||
82 | static int __init s3c6400_core_init(void) | 83 | static int __init s3c6400_core_init(void) |
83 | { | 84 | { |
84 | return sysdev_class_register(&s3c6400_sysclass); | 85 | return subsys_system_register(&s3c6400_subsys, NULL); |
85 | } | 86 | } |
86 | 87 | ||
87 | core_initcall(s3c6400_core_init); | 88 | core_initcall(s3c6400_core_init); |
@@ -90,5 +91,5 @@ int __init s3c6400_init(void) | |||
90 | { | 91 | { |
91 | printk("S3C6400: Initialising architecture\n"); | 92 | printk("S3C6400: Initialising architecture\n"); |
92 | 93 | ||
93 | return sysdev_register(&s3c6400_sysdev); | 94 | return device_register(&s3c6400_dev); |
94 | } | 95 | } |
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c index fba71bd991c7..31c29fdf1800 100644 --- a/arch/arm/mach-s3c64xx/s3c6410.c +++ b/arch/arm/mach-s3c64xx/s3c6410.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/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/sysdev.h> | 21 | #include <linux/device.h> |
22 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | 24 | ||
@@ -75,17 +75,18 @@ void __init s3c6410_init_irq(void) | |||
75 | s3c64xx_init_irq(~0 & ~(1 << 7), ~0); | 75 | s3c64xx_init_irq(~0 & ~(1 << 7), ~0); |
76 | } | 76 | } |
77 | 77 | ||
78 | struct sysdev_class s3c6410_sysclass = { | 78 | struct bus_type s3c6410_subsys = { |
79 | .name = "s3c6410-core", | 79 | .name = "s3c6410-core", |
80 | .dev_name = "s3c6410-core", | ||
80 | }; | 81 | }; |
81 | 82 | ||
82 | static struct sys_device s3c6410_sysdev = { | 83 | static struct device s3c6410_dev = { |
83 | .cls = &s3c6410_sysclass, | 84 | .bus = &s3c6410_subsys, |
84 | }; | 85 | }; |
85 | 86 | ||
86 | static int __init s3c6410_core_init(void) | 87 | static int __init s3c6410_core_init(void) |
87 | { | 88 | { |
88 | return sysdev_class_register(&s3c6410_sysclass); | 89 | return subsys_system_register(&s3c6410_subsys, NULL); |
89 | } | 90 | } |
90 | 91 | ||
91 | core_initcall(s3c6410_core_init); | 92 | core_initcall(s3c6410_core_init); |
@@ -94,5 +95,5 @@ int __init s3c6410_init(void) | |||
94 | { | 95 | { |
95 | printk("S3C6410: Initialising architecture\n"); | 96 | printk("S3C6410: Initialising architecture\n"); |
96 | 97 | ||
97 | return sysdev_register(&s3c6410_sysdev); | 98 | return device_register(&s3c6410_dev); |
98 | } | 99 | } |
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-s5p64x0/clock-s5p6440.c index dd2b8daef0cd..eb4ffe331e1a 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6440.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-s5p64x0/clock-s5p6450.c index 328a224f0075..bb7ee912090b 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6450.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-s5p64x0/clock.c b/arch/arm/mach-s5p64x0/clock.c index b289b726a7d6..241d0e645c85 100644 --- a/arch/arm/mach-s5p64x0/clock.c +++ b/arch/arm/mach-s5p64x0/clock.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index b7555a0fb0fb..28d0b918cd4b 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/device.h> |
21 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
@@ -257,17 +257,18 @@ void __init s5p6450_init_irq(void) | |||
257 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | 257 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
258 | } | 258 | } |
259 | 259 | ||
260 | struct sysdev_class s5p64x0_sysclass = { | 260 | struct bus_type s5p64x0_subsys = { |
261 | .name = "s5p64x0-core", | 261 | .name = "s5p64x0-core", |
262 | .dev_name = "s5p64x0-core", | ||
262 | }; | 263 | }; |
263 | 264 | ||
264 | static struct sys_device s5p64x0_sysdev = { | 265 | static struct device s5p64x0_dev = { |
265 | .cls = &s5p64x0_sysclass, | 266 | .bus = &s5p64x0_subsys, |
266 | }; | 267 | }; |
267 | 268 | ||
268 | static int __init s5p64x0_core_init(void) | 269 | static int __init s5p64x0_core_init(void) |
269 | { | 270 | { |
270 | return sysdev_class_register(&s5p64x0_sysclass); | 271 | return subsys_system_register(&s5p64x0_subsys, NULL); |
271 | } | 272 | } |
272 | core_initcall(s5p64x0_core_init); | 273 | core_initcall(s5p64x0_core_init); |
273 | 274 | ||
@@ -278,7 +279,7 @@ int __init s5p64x0_init(void) | |||
278 | /* set idle function */ | 279 | /* set idle function */ |
279 | pm_idle = s5p64x0_idle; | 280 | pm_idle = s5p64x0_idle; |
280 | 281 | ||
281 | return sysdev_register(&s5p64x0_sysdev); | 282 | return device_register(&s5p64x0_dev); |
282 | } | 283 | } |
283 | 284 | ||
284 | static struct s3c24xx_uart_clksrc s5p64x0_serial_clocks[] = { | 285 | static struct s3c24xx_uart_clksrc s5p64x0_serial_clocks[] = { |
diff --git a/arch/arm/mach-s5p64x0/pm.c b/arch/arm/mach-s5p64x0/pm.c index 69927243d25f..23f9b22439c9 100644 --- a/arch/arm/mach-s5p64x0/pm.c +++ b/arch/arm/mach-s5p64x0/pm.c | |||
@@ -160,7 +160,7 @@ static void s5p64x0_pm_prepare(void) | |||
160 | 160 | ||
161 | } | 161 | } |
162 | 162 | ||
163 | static int s5p64x0_pm_add(struct sys_device *sysdev) | 163 | static int s5p64x0_pm_add(struct device *dev) |
164 | { | 164 | { |
165 | pm_cpu_prep = s5p64x0_pm_prepare; | 165 | pm_cpu_prep = s5p64x0_pm_prepare; |
166 | pm_cpu_sleep = s5p64x0_cpu_suspend; | 166 | pm_cpu_sleep = s5p64x0_cpu_suspend; |
@@ -169,15 +169,17 @@ static int s5p64x0_pm_add(struct sys_device *sysdev) | |||
169 | return 0; | 169 | return 0; |
170 | } | 170 | } |
171 | 171 | ||
172 | static struct sysdev_driver s5p64x0_pm_driver = { | 172 | static struct subsys_interface s5p64x0_pm_interface = { |
173 | .add = s5p64x0_pm_add, | 173 | .name = "s5p64x0_pm", |
174 | .subsys = &s5p64x0_subsys, | ||
175 | .add_dev = s5p64x0_pm_add, | ||
174 | }; | 176 | }; |
175 | 177 | ||
176 | static __init int s5p64x0_pm_drvinit(void) | 178 | static __init int s5p64x0_pm_drvinit(void) |
177 | { | 179 | { |
178 | s3c_pm_init(); | 180 | s3c_pm_init(); |
179 | 181 | ||
180 | return sysdev_driver_register(&s5p64x0_sysclass, &s5p64x0_pm_driver); | 182 | return subsys_interface_register(&s5p64x0_pm_interface); |
181 | } | 183 | } |
182 | arch_initcall(s5p64x0_pm_drvinit); | 184 | arch_initcall(s5p64x0_pm_drvinit); |
183 | 185 | ||
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c index 73594a2fcf26..c9095730a7f5 100644 --- a/arch/arm/mach-s5pc100/common.c +++ b/arch/arm/mach-s5pc100/common.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/sysdev.h> | 23 | #include <linux/device.h> |
24 | #include <linux/serial_core.h> | 24 | #include <linux/serial_core.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
@@ -192,17 +192,18 @@ void __init s5pc100_init_irq(void) | |||
192 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | 192 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
193 | } | 193 | } |
194 | 194 | ||
195 | static struct sysdev_class s5pc100_sysclass = { | 195 | static struct bus_type s5pc100_subsys = { |
196 | .name = "s5pc100-core", | 196 | .name = "s5pc100-core", |
197 | .dev_name = "s5pc100-core", | ||
197 | }; | 198 | }; |
198 | 199 | ||
199 | static struct sys_device s5pc100_sysdev = { | 200 | static struct device s5pc100_dev = { |
200 | .cls = &s5pc100_sysclass, | 201 | .bus = &s5pc100_subsys, |
201 | }; | 202 | }; |
202 | 203 | ||
203 | static int __init s5pc100_core_init(void) | 204 | static int __init s5pc100_core_init(void) |
204 | { | 205 | { |
205 | return sysdev_class_register(&s5pc100_sysclass); | 206 | return subsys_system_register(&s5pc100_subsys, NULL); |
206 | } | 207 | } |
207 | core_initcall(s5pc100_core_init); | 208 | core_initcall(s5pc100_core_init); |
208 | 209 | ||
@@ -213,7 +214,7 @@ int __init s5pc100_init(void) | |||
213 | /* set idle function */ | 214 | /* set idle function */ |
214 | pm_idle = s5pc100_idle; | 215 | pm_idle = s5pc100_idle; |
215 | 216 | ||
216 | return sysdev_register(&s5pc100_sysdev); | 217 | return device_register(&s5pc100_dev); |
217 | } | 218 | } |
218 | 219 | ||
219 | /* uart registration process */ | 220 | /* uart registration process */ |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index f2dbf5f75a2c..04c9b578e626 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include <mach/map.h> | 23 | #include <mach/map.h> |
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c index a4921bc9f1dc..0ec393305d7c 100644 --- a/arch/arm/mach-s5pv210/common.c +++ b/arch/arm/mach-s5pv210/common.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/sysdev.h> | 21 | #include <linux/device.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
@@ -229,17 +229,18 @@ void __init s5pv210_init_irq(void) | |||
229 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | 229 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
230 | } | 230 | } |
231 | 231 | ||
232 | struct sysdev_class s5pv210_sysclass = { | 232 | struct bus_type s5pv210_subsys = { |
233 | .name = "s5pv210-core", | 233 | .name = "s5pv210-core", |
234 | .dev_name = "s5pv210-core", | ||
234 | }; | 235 | }; |
235 | 236 | ||
236 | static struct sys_device s5pv210_sysdev = { | 237 | static struct device s5pv210_dev = { |
237 | .cls = &s5pv210_sysclass, | 238 | .bus = &s5pv210_subsys, |
238 | }; | 239 | }; |
239 | 240 | ||
240 | static int __init s5pv210_core_init(void) | 241 | static int __init s5pv210_core_init(void) |
241 | { | 242 | { |
242 | return sysdev_class_register(&s5pv210_sysclass); | 243 | return subsys_system_register(&s5pv210_subsys, NULL); |
243 | } | 244 | } |
244 | core_initcall(s5pv210_core_init); | 245 | core_initcall(s5pv210_core_init); |
245 | 246 | ||
@@ -250,7 +251,7 @@ int __init s5pv210_init(void) | |||
250 | /* set idle function */ | 251 | /* set idle function */ |
251 | pm_idle = s5pv210_idle; | 252 | pm_idle = s5pv210_idle; |
252 | 253 | ||
253 | return sysdev_register(&s5pv210_sysdev); | 254 | return device_register(&s5pv210_dev); |
254 | } | 255 | } |
255 | 256 | ||
256 | static struct s3c24xx_uart_clksrc s5pv210_serial_clocks[] = { | 257 | static struct s3c24xx_uart_clksrc s5pv210_serial_clocks[] = { |
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index 9405da4ae3a3..b323983b2c54 100644 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/serial_core.h> | 14 | #include <linux/serial_core.h> |
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/sysdev.h> | 16 | #include <linux/device.h> |
17 | 17 | ||
18 | #include <asm/hardware/vic.h> | 18 | #include <asm/hardware/vic.h> |
19 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index cf4da7393822..b4021dd802a8 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/serial_core.h> | 15 | #include <linux/serial_core.h> |
16 | #include <linux/sysdev.h> | 16 | #include <linux/device.h> |
17 | #include <linux/dm9000.h> | 17 | #include <linux/dm9000.h> |
18 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index f149d278377b..677c71c41e50 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c | |||
@@ -133,7 +133,7 @@ static void s5pv210_pm_prepare(void) | |||
133 | s3c_pm_do_save(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save)); | 133 | s3c_pm_do_save(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save)); |
134 | } | 134 | } |
135 | 135 | ||
136 | static int s5pv210_pm_add(struct sys_device *sysdev) | 136 | static int s5pv210_pm_add(struct device *dev) |
137 | { | 137 | { |
138 | pm_cpu_prep = s5pv210_pm_prepare; | 138 | pm_cpu_prep = s5pv210_pm_prepare; |
139 | pm_cpu_sleep = s5pv210_cpu_suspend; | 139 | pm_cpu_sleep = s5pv210_cpu_suspend; |
@@ -141,13 +141,15 @@ static int s5pv210_pm_add(struct sys_device *sysdev) | |||
141 | return 0; | 141 | return 0; |
142 | } | 142 | } |
143 | 143 | ||
144 | static struct sysdev_driver s5pv210_pm_driver = { | 144 | static struct subsys_interface s5pv210_pm_interface = { |
145 | .add = s5pv210_pm_add, | 145 | .name = "s5pv210_pm", |
146 | .subsys = &s5pv210_subsys, | ||
147 | .add_dev = s5pv210_pm_add, | ||
146 | }; | 148 | }; |
147 | 149 | ||
148 | static __init int s5pv210_pm_drvinit(void) | 150 | static __init int s5pv210_pm_drvinit(void) |
149 | { | 151 | { |
150 | return sysdev_driver_register(&s5pv210_sysclass, &s5pv210_pm_driver); | 152 | return subsys_interface_register(&s5pv210_pm_interface); |
151 | } | 153 | } |
152 | arch_initcall(s5pv210_pm_drvinit); | 154 | arch_initcall(s5pv210_pm_drvinit); |
153 | 155 | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index cbcda61162d3..02b7b9303f3b 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/dma-mapping.h> | 23 | #include <linux/dma-mapping.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/sysdev.h> | ||
26 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
27 | #include <linux/irqdomain.h> | 26 | #include <linux/irqdomain.h> |
28 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c index 63b8dd2b9f4d..98f65493177a 100644 --- a/arch/arm/mach-versatile/versatile_ab.c +++ b/arch/arm/mach-versatile/versatile_ab.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/sysdev.h> | ||
25 | #include <linux/amba/bus.h> | 24 | #include <linux/amba/bus.h> |
26 | #include <linux/io.h> | 25 | #include <linux/io.h> |
27 | 26 | ||
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c index 7aab79b665e7..9581c197500c 100644 --- a/arch/arm/mach-versatile/versatile_pb.c +++ b/arch/arm/mach-versatile/versatile_pb.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/sysdev.h> | ||
25 | #include <linux/amba/bus.h> | 24 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 25 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 26 | #include <linux/amba/mmci.h> |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 6dd10e320ef6..b4a28ca0e50a 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/ata_platform.h> | 10 | #include <linux/ata_platform.h> |
11 | #include <linux/smsc911x.h> | 11 | #include <linux/smsc911x.h> |
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/sysdev.h> | 13 | #include <linux/device.h> |
14 | #include <linux/usb/isp1760.h> | 14 | #include <linux/usb/isp1760.h> |
15 | #include <linux/clkdev.h> | 15 | #include <linux/clkdev.h> |
16 | #include <linux/mtd/physmap.h> | 16 | #include <linux/mtd/physmap.h> |
diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c index b466e2450ba3..d66d43ae8df5 100644 --- a/arch/arm/mach-w90x900/irq.c +++ b/arch/arm/mach-w90x900/irq.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
21 | #include <linux/ptrace.h> | 21 | #include <linux/ptrace.h> |
22 | #include <linux/sysdev.h> | 22 | #include <linux/device.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | 24 | ||
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
diff --git a/arch/arm/plat-s3c24xx/common-smdk.c b/arch/arm/plat-s3c24xx/common-smdk.c index bcc43f346272..084604be6ad1 100644 --- a/arch/arm/plat-s3c24xx/common-smdk.c +++ b/arch/arm/plat-s3c24xx/common-smdk.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/sysdev.h> | 22 | #include <linux/device.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | 24 | ||
25 | #include <linux/mtd/mtd.h> | 25 | #include <linux/mtd/mtd.h> |
diff --git a/arch/arm/plat-s3c24xx/cpu-freq.c b/arch/arm/plat-s3c24xx/cpu-freq.c index b3d3d0278997..468079938884 100644 --- a/arch/arm/plat-s3c24xx/cpu-freq.c +++ b/arch/arm/plat-s3c24xx/cpu-freq.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/sysdev.h> | 23 | #include <linux/device.h> |
24 | #include <linux/sysfs.h> | 24 | #include <linux/sysfs.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | 26 | ||
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index fc8c5f89954d..bc42c04091fd 100644 --- a/arch/arm/plat-s3c24xx/irq.c +++ b/arch/arm/plat-s3c24xx/irq.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/sysdev.h> | 25 | #include <linux/device.h> |
26 | #include <linux/syscore_ops.h> | 26 | #include <linux/syscore_ops.h> |
27 | 27 | ||
28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
diff --git a/arch/arm/plat-s3c24xx/pm-simtec.c b/arch/arm/plat-s3c24xx/pm-simtec.c index 663b280d65da..68296b1fe7e5 100644 --- a/arch/arm/plat-s3c24xx/pm-simtec.c +++ b/arch/arm/plat-s3c24xx/pm-simtec.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/sysdev.h> | ||
22 | #include <linux/device.h> | 21 | #include <linux/device.h> |
23 | #include <linux/io.h> | 22 | #include <linux/io.h> |
24 | 23 | ||
diff --git a/arch/arm/plat-s3c24xx/s3c2410-clock.c b/arch/arm/plat-s3c24xx/s3c2410-clock.c index def76aa3825a..25dc4d4397b1 100644 --- a/arch/arm/plat-s3c24xx/s3c2410-clock.c +++ b/arch/arm/plat-s3c24xx/s3c2410-clock.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/list.h> | 26 | #include <linux/list.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/sysdev.h> | 29 | #include <linux/device.h> |
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
diff --git a/arch/arm/plat-s3c24xx/s3c2412-iotiming.c b/arch/arm/plat-s3c24xx/s3c2412-iotiming.c index 0b46d3895d62..48eee39ab369 100644 --- a/arch/arm/plat-s3c24xx/s3c2412-iotiming.c +++ b/arch/arm/plat-s3c24xx/s3c2412-iotiming.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/cpufreq.h> | 18 | #include <linux/cpufreq.h> |
19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/device.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
diff --git a/arch/arm/plat-s5p/clock.c b/arch/arm/plat-s5p/clock.c index 5f84a3f13ef9..963edea7f7e7 100644 --- a/arch/arm/plat-s5p/clock.c +++ b/arch/arm/plat-s5p/clock.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <asm/div64.h> | 22 | #include <asm/div64.h> |
23 | 23 | ||
diff --git a/arch/arm/plat-s5p/irq-eint.c b/arch/arm/plat-s5p/irq-eint.c index b5bb774985b0..c496b359c371 100644 --- a/arch/arm/plat-s5p/irq-eint.c +++ b/arch/arm/plat-s5p/irq-eint.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/device.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | 19 | ||
20 | #include <asm/hardware/vic.h> | 20 | #include <asm/hardware/vic.h> |
diff --git a/arch/arm/plat-samsung/clock-clksrc.c b/arch/arm/plat-samsung/clock-clksrc.c index ae8b8507663f..786a4107a157 100644 --- a/arch/arm/plat-samsung/clock-clksrc.c +++ b/arch/arm/plat-samsung/clock-clksrc.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/device.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | 21 | ||
22 | #include <plat/clock.h> | 22 | #include <plat/clock.h> |
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 3b4451979d1b..10f71179071f 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | #include <linux/sysdev.h> | 36 | #include <linux/device.h> |
37 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
38 | #include <linux/ioport.h> | 38 | #include <linux/ioport.h> |
39 | #include <linux/clk.h> | 39 | #include <linux/clk.h> |
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 258d9d8a94f2..73cb3cfd0685 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -180,19 +180,19 @@ extern struct syscore_ops s3c2412_pm_syscore_ops; | |||
180 | extern struct syscore_ops s3c2416_pm_syscore_ops; | 180 | extern struct syscore_ops s3c2416_pm_syscore_ops; |
181 | extern struct syscore_ops s3c244x_pm_syscore_ops; | 181 | extern struct syscore_ops s3c244x_pm_syscore_ops; |
182 | 182 | ||
183 | /* system device classes */ | 183 | /* system device subsystems */ |
184 | 184 | ||
185 | extern struct sysdev_class s3c2410_sysclass; | 185 | extern struct bus_type s3c2410_subsys; |
186 | extern struct sysdev_class s3c2410a_sysclass; | 186 | extern struct bus_type s3c2410a_subsys; |
187 | extern struct sysdev_class s3c2412_sysclass; | 187 | extern struct bus_type s3c2412_subsys; |
188 | extern struct sysdev_class s3c2416_sysclass; | 188 | extern struct bus_type s3c2416_subsys; |
189 | extern struct sysdev_class s3c2440_sysclass; | 189 | extern struct bus_type s3c2440_subsys; |
190 | extern struct sysdev_class s3c2442_sysclass; | 190 | extern struct bus_type s3c2442_subsys; |
191 | extern struct sysdev_class s3c2443_sysclass; | 191 | extern struct bus_type s3c2443_subsys; |
192 | extern struct sysdev_class s3c6410_sysclass; | 192 | extern struct bus_type s3c6410_subsys; |
193 | extern struct sysdev_class s5p64x0_sysclass; | 193 | extern struct bus_type s5p64x0_subsys; |
194 | extern struct sysdev_class s5pv210_sysclass; | 194 | extern struct bus_type s5pv210_subsys; |
195 | extern struct sysdev_class exynos4_sysclass; | 195 | extern struct bus_type exynos4_subsys; |
196 | 196 | ||
197 | extern void (*s5pc1xx_idle)(void); | 197 | extern void (*s5pc1xx_idle)(void); |
198 | 198 | ||
diff --git a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h index 1c1ed5481253..d01576318b2c 100644 --- a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h +++ b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <plat/dma-core.h> | 13 | #include <plat/dma-core.h> |
14 | 14 | ||
15 | extern struct sysdev_class dma_sysclass; | 15 | extern struct bus_type dma_subsys; |
16 | extern struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; | 16 | extern struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; |
17 | 17 | ||
18 | #define DMA_CH_VALID (1<<31) | 18 | #define DMA_CH_VALID (1<<31) |
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index dcf68709f9cf..78014e53eb3c 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | 19 | ||
20 | struct sys_device; | 20 | struct device; |
21 | 21 | ||
22 | #ifdef CONFIG_PM | 22 | #ifdef CONFIG_PM |
23 | 23 | ||
diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/plat-samsung/pm-gpio.c index 4be016eaa6db..c2ff92c30bdf 100644 --- a/arch/arm/plat-samsung/pm-gpio.c +++ b/arch/arm/plat-samsung/pm-gpio.c | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/device.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
diff --git a/arch/arm/plat-samsung/wakeup-mask.c b/arch/arm/plat-samsung/wakeup-mask.c index dc814037297b..20c3d9117cc2 100644 --- a/arch/arm/plat-samsung/wakeup-mask.c +++ b/arch/arm/plat-samsung/wakeup-mask.c | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/sysdev.h> | 14 | #include <linux/device.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |