diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 14:42:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 14:42:52 -0500 |
commit | ff4b8a57f0aaa2882d444ca44b2b9b333d22a4df (patch) | |
tree | d851c923f85566572112d4c0f884cff388a3cc05 /arch/arm | |
parent | 805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff) | |
parent | ea04018e6bc5ddb2f0466c0e5b986bd4901b7e8e (diff) |
Merge branch 'driver-core-next' into Linux 3.2
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.
The microcode_core.c patch was provided by Stephen Rothwell
<sfr@canb.auug.org.au> who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm')
87 files changed, 416 insertions, 347 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/cpu.c b/arch/arm/mach-exynos/cpu.c index cc8d4bd6d0f7..90a0297b77b8 100644 --- a/arch/arm/mach-exynos/cpu.c +++ b/arch/arm/mach-exynos/cpu.c | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sysdev.h> | 12 | #include <linux/device.h> |
13 | 13 | ||
14 | #include <asm/mach/map.h> | 14 | #include <asm/mach/map.h> |
15 | #include <asm/mach/irq.h> | 15 | #include <asm/mach/irq.h> |
@@ -238,17 +238,18 @@ void __init exynos4_init_irq(void) | |||
238 | s5p_init_irq(NULL, 0); | 238 | s5p_init_irq(NULL, 0); |
239 | } | 239 | } |
240 | 240 | ||
241 | struct sysdev_class exynos4_sysclass = { | 241 | struct bus_type exynos4_subsys = { |
242 | .name = "exynos4-core", | 242 | .name = "exynos4-core", |
243 | .dev_name = "exynos4-core", | ||
243 | }; | 244 | }; |
244 | 245 | ||
245 | static struct sys_device exynos4_sysdev = { | 246 | static struct device exynos4_dev = { |
246 | .cls = &exynos4_sysclass, | 247 | .bus = &exynos4_subsys, |
247 | }; | 248 | }; |
248 | 249 | ||
249 | static int __init exynos4_core_init(void) | 250 | static int __init exynos4_core_init(void) |
250 | { | 251 | { |
251 | return sysdev_class_register(&exynos4_sysclass); | 252 | return subsys_system_register(&exynos4_subsys, NULL); |
252 | } | 253 | } |
253 | core_initcall(exynos4_core_init); | 254 | core_initcall(exynos4_core_init); |
254 | 255 | ||
@@ -289,5 +290,5 @@ int __init exynos_init(void) | |||
289 | if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) | 290 | if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) |
290 | s5p_reset_hook = exynos4_sw_reset; | 291 | s5p_reset_hook = exynos4_sw_reset; |
291 | 292 | ||
292 | return sysdev_register(&exynos4_sysdev); | 293 | return device_register(&exynos4_dev); |
293 | } | 294 | } |
diff --git a/arch/arm/mach-exynos/irq-eint.c b/arch/arm/mach-exynos/irq-eint.c index badb8c66fc9b..fe461901d60f 100644 --- a/arch/arm/mach-exynos/irq-eint.c +++ b/arch/arm/mach-exynos/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 <plat/pm.h> | 20 | #include <plat/pm.h> |
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 5de49c33e4d4..208545c53da6 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 6d2f0d1b9373..21f3d4b9ee85 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 026c66ad7ec2..af608f76e0a7 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 c057540ec776..510424669d0e 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 671ad6d6ff00..70d1bbdf2a3e 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 cbf22df4ad5b..b841fc0a75dc 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 63c4114afae9..e102120fc6ac 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 05a7d16e59f5..837a2d6f3524 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 451852156254..6f69789943d5 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 3d7ebc557a72..da6651556eb9 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/sysdev.h> | 21 | #include <linux/device.h> |
22 | #include <linux/syscore_ops.h> | 22 | #include <linux/syscore_ops.h> |
23 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
@@ -131,22 +131,24 @@ void __init s3c2410_init_clocks(int xtal) | |||
131 | s3c24xx_register_clock(&s3c2410_armclk); | 131 | s3c24xx_register_clock(&s3c2410_armclk); |
132 | } | 132 | } |
133 | 133 | ||
134 | struct sysdev_class s3c2410_sysclass = { | 134 | struct bus_type s3c2410_subsys = { |
135 | .name = "s3c2410-core", | 135 | .name = "s3c2410-core", |
136 | .dev_name = "s3c2410-core", | ||
136 | }; | 137 | }; |
137 | 138 | ||
138 | /* Note, we would have liked to name this s3c2410-core, but we cannot | 139 | /* Note, we would have liked to name this s3c2410-core, but we cannot |
139 | * register two sysdev_class with the same name. | 140 | * register two subsystems with the same name. |
140 | */ | 141 | */ |
141 | struct sysdev_class s3c2410a_sysclass = { | 142 | struct bus_type s3c2410a_subsys = { |
142 | .name = "s3c2410a-core", | 143 | .name = "s3c2410a-core", |
144 | .dev_name = "s3c2410a-core", | ||
143 | }; | 145 | }; |
144 | 146 | ||
145 | static struct sys_device s3c2410_sysdev = { | 147 | static struct device s3c2410_dev = { |
146 | .cls = &s3c2410_sysclass, | 148 | .bus = &s3c2410_subsys, |
147 | }; | 149 | }; |
148 | 150 | ||
149 | /* need to register class before we actually register the device, and | 151 | /* need to register the subsystem before we actually register the device, and |
150 | * we also need to ensure that it has been initialised before any of the | 152 | * we also need to ensure that it has been initialised before any of the |
151 | * drivers even try to use it (even if not on an s3c2410 based system) | 153 | * drivers even try to use it (even if not on an s3c2410 based system) |
152 | * as a driver which may support both 2410 and 2440 may try and use it. | 154 | * as a driver which may support both 2410 and 2440 may try and use it. |
@@ -154,14 +156,14 @@ static struct sys_device s3c2410_sysdev = { | |||
154 | 156 | ||
155 | static int __init s3c2410_core_init(void) | 157 | static int __init s3c2410_core_init(void) |
156 | { | 158 | { |
157 | return sysdev_class_register(&s3c2410_sysclass); | 159 | return subsys_system_register(&s3c2410_subsys, NULL); |
158 | } | 160 | } |
159 | 161 | ||
160 | core_initcall(s3c2410_core_init); | 162 | core_initcall(s3c2410_core_init); |
161 | 163 | ||
162 | static int __init s3c2410a_core_init(void) | 164 | static int __init s3c2410a_core_init(void) |
163 | { | 165 | { |
164 | return sysdev_class_register(&s3c2410a_sysclass); | 166 | return subsys_system_register(&s3c2410a_subsys, NULL); |
165 | } | 167 | } |
166 | 168 | ||
167 | core_initcall(s3c2410a_core_init); | 169 | core_initcall(s3c2410a_core_init); |
@@ -175,11 +177,11 @@ int __init s3c2410_init(void) | |||
175 | #endif | 177 | #endif |
176 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 178 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
177 | 179 | ||
178 | return sysdev_register(&s3c2410_sysdev); | 180 | return device_register(&s3c2410_dev); |
179 | } | 181 | } |
180 | 182 | ||
181 | int __init s3c2410a_init(void) | 183 | int __init s3c2410a_init(void) |
182 | { | 184 | { |
183 | s3c2410_sysdev.cls = &s3c2410a_sysclass; | 185 | s3c2410_dev.bus = &s3c2410a_subsys; |
184 | return s3c2410_init(); | 186 | return s3c2410_init(); |
185 | } | 187 | } |
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 57a1e01e4e50..6c7253ffc5bc 100644 --- a/arch/arm/mach-s3c2412/s3c2412.c +++ b/arch/arm/mach-s3c2412/s3c2412.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/sysdev.h> | 21 | #include <linux/device.h> |
22 | #include <linux/syscore_ops.h> | 22 | #include <linux/syscore_ops.h> |
23 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
@@ -220,25 +220,26 @@ void __init s3c2412_init_clocks(int xtal) | |||
220 | s3c2412_baseclk_add(); | 220 | s3c2412_baseclk_add(); |
221 | } | 221 | } |
222 | 222 | ||
223 | /* need to register class before we actually register the device, and | 223 | /* need to register the subsystem before we actually register the device, and |
224 | * we also need to ensure that it has been initialised before any of the | 224 | * we also need to ensure that it has been initialised before any of the |
225 | * drivers even try to use it (even if not on an s3c2412 based system) | 225 | * drivers even try to use it (even if not on an s3c2412 based system) |
226 | * as a driver which may support both 2410 and 2440 may try and use it. | 226 | * as a driver which may support both 2410 and 2440 may try and use it. |
227 | */ | 227 | */ |
228 | 228 | ||
229 | struct sysdev_class s3c2412_sysclass = { | 229 | struct bus_type s3c2412_subsys = { |
230 | .name = "s3c2412-core", | 230 | .name = "s3c2412-core", |
231 | .dev_name = "s3c2412-core", | ||
231 | }; | 232 | }; |
232 | 233 | ||
233 | static int __init s3c2412_core_init(void) | 234 | static int __init s3c2412_core_init(void) |
234 | { | 235 | { |
235 | return sysdev_class_register(&s3c2412_sysclass); | 236 | return subsys_system_register(&s3c2412_subsys, NULL); |
236 | } | 237 | } |
237 | 238 | ||
238 | core_initcall(s3c2412_core_init); | 239 | core_initcall(s3c2412_core_init); |
239 | 240 | ||
240 | static struct sys_device s3c2412_sysdev = { | 241 | static struct device s3c2412_dev = { |
241 | .cls = &s3c2412_sysclass, | 242 | .bus = &s3c2412_subsys, |
242 | }; | 243 | }; |
243 | 244 | ||
244 | int __init s3c2412_init(void) | 245 | int __init s3c2412_init(void) |
@@ -250,5 +251,5 @@ int __init s3c2412_init(void) | |||
250 | #endif | 251 | #endif |
251 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 252 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
252 | 253 | ||
253 | return sysdev_register(&s3c2412_sysdev); | 254 | return device_register(&s3c2412_dev); |
254 | } | 255 | } |
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 ee214bc83c83..143db908c2c5 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> |
@@ -68,12 +68,13 @@ static struct map_desc s3c2416_iodesc[] __initdata = { | |||
68 | IODESC_ENT(TIMER), | 68 | IODESC_ENT(TIMER), |
69 | }; | 69 | }; |
70 | 70 | ||
71 | struct sysdev_class s3c2416_sysclass = { | 71 | struct bus_type s3c2416_subsys = { |
72 | .name = "s3c2416-core", | 72 | .name = "s3c2416-core", |
73 | .dev_name = "s3c2416-core", | ||
73 | }; | 74 | }; |
74 | 75 | ||
75 | static struct sys_device s3c2416_sysdev = { | 76 | static struct device s3c2416_dev = { |
76 | .cls = &s3c2416_sysclass, | 77 | .bus = &s3c2416_subsys, |
77 | }; | 78 | }; |
78 | 79 | ||
79 | static void s3c2416_hard_reset(void) | 80 | static void s3c2416_hard_reset(void) |
@@ -105,7 +106,7 @@ int __init s3c2416_init(void) | |||
105 | #endif | 106 | #endif |
106 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 107 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
107 | 108 | ||
108 | return sysdev_register(&s3c2416_sysdev); | 109 | return device_register(&s3c2416_dev); |
109 | } | 110 | } |
110 | 111 | ||
111 | void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) | 112 | void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) |
@@ -133,7 +134,7 @@ void __init s3c2416_map_io(void) | |||
133 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); | 134 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); |
134 | } | 135 | } |
135 | 136 | ||
136 | /* need to register class before we actually register the device, and | 137 | /* need to register the subsystem before we actually register the device, and |
137 | * we also need to ensure that it has been initialised before any of the | 138 | * we also need to ensure that it has been initialised before any of the |
138 | * drivers even try to use it (even if not on an s3c2416 based system) | 139 | * drivers even try to use it (even if not on an s3c2416 based system) |
139 | * as a driver which may support both 2443 and 2440 may try and use it. | 140 | * as a driver which may support both 2443 and 2440 may try and use it. |
@@ -141,7 +142,7 @@ void __init s3c2416_map_io(void) | |||
141 | 142 | ||
142 | static int __init s3c2416_core_init(void) | 143 | static int __init s3c2416_core_init(void) |
143 | { | 144 | { |
144 | return sysdev_class_register(&s3c2416_sysclass); | 145 | return subsys_system_register(&s3c2416_subsys, NULL); |
145 | } | 146 | } |
146 | 147 | ||
147 | core_initcall(s3c2416_core_init); | 148 | 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 0d3453bf567c..2078c1fe8e35 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 e19499c2f909..4c2f553fbd52 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 37f8cc6aabd4..2b3dddb49af7 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> |
@@ -40,8 +40,8 @@ | |||
40 | #include <plat/gpio-cfg.h> | 40 | #include <plat/gpio-cfg.h> |
41 | #include <plat/gpio-cfg-helpers.h> | 41 | #include <plat/gpio-cfg-helpers.h> |
42 | 42 | ||
43 | static struct sys_device s3c2440_sysdev = { | 43 | static struct device s3c2440_dev = { |
44 | .cls = &s3c2440_sysclass, | 44 | .bus = &s3c2440_subsys, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | int __init s3c2440_init(void) | 47 | int __init s3c2440_init(void) |
@@ -63,7 +63,7 @@ int __init s3c2440_init(void) | |||
63 | 63 | ||
64 | /* register our system device for everything else */ | 64 | /* register our system device for everything else */ |
65 | 65 | ||
66 | return sysdev_register(&s3c2440_sysdev); | 66 | return device_register(&s3c2440_dev); |
67 | } | 67 | } |
68 | 68 | ||
69 | void __init s3c2440_map_io(void) | 69 | 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 a22b771b0f36..aa90ae4fc980 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 | ||
@@ -49,12 +49,13 @@ static struct map_desc s3c2443_iodesc[] __initdata = { | |||
49 | IODESC_ENT(TIMER), | 49 | IODESC_ENT(TIMER), |
50 | }; | 50 | }; |
51 | 51 | ||
52 | struct sysdev_class s3c2443_sysclass = { | 52 | struct bus_type s3c2443_subsys = { |
53 | .name = "s3c2443-core", | 53 | .name = "s3c2443-core", |
54 | .dev_name = "s3c2443-core", | ||
54 | }; | 55 | }; |
55 | 56 | ||
56 | static struct sys_device s3c2443_sysdev = { | 57 | static struct device s3c2443_dev = { |
57 | .cls = &s3c2443_sysclass, | 58 | .bus = &s3c2443_subsys, |
58 | }; | 59 | }; |
59 | 60 | ||
60 | static void s3c2443_hard_reset(void) | 61 | static void s3c2443_hard_reset(void) |
@@ -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/cpu.c b/arch/arm/mach-s3c64xx/cpu.c index de085b798aa4..0f8a669dc7fc 100644 --- a/arch/arm/mach-s3c64xx/cpu.c +++ b/arch/arm/mach-s3c64xx/cpu.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/ioport.h> | 18 | #include <linux/ioport.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/device.h> |
20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
@@ -122,12 +122,13 @@ static struct map_desc s3c_iodesc[] __initdata = { | |||
122 | }; | 122 | }; |
123 | 123 | ||
124 | 124 | ||
125 | struct sysdev_class s3c64xx_sysclass = { | 125 | struct bus_type s3c64xx_subsys = { |
126 | .name = "s3c64xx-core", | 126 | .name = "s3c64xx-core", |
127 | .dev_name = "s3c64xx-core", | ||
127 | }; | 128 | }; |
128 | 129 | ||
129 | static struct sys_device s3c64xx_sysdev = { | 130 | static struct device s3c64xx_dev = { |
130 | .cls = &s3c64xx_sysclass, | 131 | .bus = &s3c64xx_subsys, |
131 | }; | 132 | }; |
132 | 133 | ||
133 | /* uart registration process */ | 134 | /* uart registration process */ |
@@ -152,10 +153,10 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | |||
152 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); | 153 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); |
153 | } | 154 | } |
154 | 155 | ||
155 | static __init int s3c64xx_sysdev_init(void) | 156 | static __init int s3c64xx_dev_init(void) |
156 | { | 157 | { |
157 | sysdev_class_register(&s3c64xx_sysclass); | 158 | subsys_system_register(&s3c64xx_subsys, NULL); |
158 | return sysdev_register(&s3c64xx_sysdev); | 159 | return device_register(&s3c64xx_dev); |
159 | } | 160 | } |
160 | 161 | ||
161 | core_initcall(s3c64xx_sysdev_init); | 162 | core_initcall(s3c64xx_dev_init); |
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/irq-eint.c b/arch/arm/mach-s3c64xx/irq-eint.c index 4d203be1f4c3..e3e75d186039 100644 --- a/arch/arm/mach-s3c64xx/irq-eint.c +++ b/arch/arm/mach-s3c64xx/irq-eint.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/device.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c index 51c00f2453c6..691a7ca78c1e 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 | ||
@@ -70,17 +70,18 @@ void __init s3c6400_init_irq(void) | |||
70 | s3c64xx_init_irq(~0 & ~(0xf << 5), ~0); | 70 | s3c64xx_init_irq(~0 & ~(0xf << 5), ~0); |
71 | } | 71 | } |
72 | 72 | ||
73 | static struct sysdev_class s3c6400_sysclass = { | 73 | static struct bus_type s3c6400_subsys = { |
74 | .name = "s3c6400-core", | 74 | .name = "s3c6400-core", |
75 | .dev_name = "s3c6400-core", | ||
75 | }; | 76 | }; |
76 | 77 | ||
77 | static struct sys_device s3c6400_sysdev = { | 78 | static struct device s3c6400_dev = { |
78 | .cls = &s3c6400_sysclass, | 79 | .bus = &s3c6400_subsys, |
79 | }; | 80 | }; |
80 | 81 | ||
81 | static int __init s3c6400_core_init(void) | 82 | static int __init s3c6400_core_init(void) |
82 | { | 83 | { |
83 | return sysdev_class_register(&s3c6400_sysclass); | 84 | return subsys_system_register(&s3c6400_subsys, NULL); |
84 | } | 85 | } |
85 | 86 | ||
86 | core_initcall(s3c6400_core_init); | 87 | core_initcall(s3c6400_core_init); |
@@ -89,5 +90,5 @@ int __init s3c6400_init(void) | |||
89 | { | 90 | { |
90 | printk("S3C6400: Initialising architecture\n"); | 91 | printk("S3C6400: Initialising architecture\n"); |
91 | 92 | ||
92 | return sysdev_register(&s3c6400_sysdev); | 93 | return device_register(&s3c6400_dev); |
93 | } | 94 | } |
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c index 4117003464ad..9a5484ad4308 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 c54c65d511f0..8a293c3e3944 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 2d04abfba12e..0277b483b9b7 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 b52c6e2f37a6..041f91e5b425 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/cpu.c b/arch/arm/mach-s5p64x0/cpu.c index ecab40cf19ab..74387a1bc76a 100644 --- a/arch/arm/mach-s5p64x0/cpu.c +++ b/arch/arm/mach-s5p64x0/cpu.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/device.h> |
20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
@@ -190,17 +190,18 @@ void __init s5p6450_init_irq(void) | |||
190 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | 190 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
191 | } | 191 | } |
192 | 192 | ||
193 | struct sysdev_class s5p64x0_sysclass = { | 193 | struct bus_type s5p64x0_subsys = { |
194 | .name = "s5p64x0-core", | 194 | .name = "s5p64x0-core", |
195 | .dev_name = "s5p64x0-core", | ||
195 | }; | 196 | }; |
196 | 197 | ||
197 | static struct sys_device s5p64x0_sysdev = { | 198 | static struct device s5p64x0_dev = { |
198 | .cls = &s5p64x0_sysclass, | 199 | .bus = &s5p64x0_subsys, |
199 | }; | 200 | }; |
200 | 201 | ||
201 | static int __init s5p64x0_core_init(void) | 202 | static int __init s5p64x0_core_init(void) |
202 | { | 203 | { |
203 | return sysdev_class_register(&s5p64x0_sysclass); | 204 | return subsys_system_register(&s5p64x0_subsys, NULL); |
204 | } | 205 | } |
205 | core_initcall(s5p64x0_core_init); | 206 | core_initcall(s5p64x0_core_init); |
206 | 207 | ||
@@ -211,5 +212,5 @@ int __init s5p64x0_init(void) | |||
211 | /* set idle function */ | 212 | /* set idle function */ |
212 | pm_idle = s5p64x0_idle; | 213 | pm_idle = s5p64x0_idle; |
213 | 214 | ||
214 | return sysdev_register(&s5p64x0_sysdev); | 215 | return device_register(&s5p64x0_dev); |
215 | } | 216 | } |
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/cpu.c b/arch/arm/mach-s5pc100/cpu.c index fd2708e7d8a9..330a10b23a5d 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/sysdev.h> | 24 | #include <linux/device.h> |
25 | #include <linux/serial_core.h> | 25 | #include <linux/serial_core.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
@@ -143,17 +143,18 @@ void __init s5pc100_init_irq(void) | |||
143 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | 143 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
144 | } | 144 | } |
145 | 145 | ||
146 | static struct sysdev_class s5pc100_sysclass = { | 146 | static struct bus_type s5pc100_subsys = { |
147 | .name = "s5pc100-core", | 147 | .name = "s5pc100-core", |
148 | .dev_name = "s5pc100-core", | ||
148 | }; | 149 | }; |
149 | 150 | ||
150 | static struct sys_device s5pc100_sysdev = { | 151 | static struct device s5pc100_dev = { |
151 | .cls = &s5pc100_sysclass, | 152 | .bus = &s5pc100_subsys, |
152 | }; | 153 | }; |
153 | 154 | ||
154 | static int __init s5pc100_core_init(void) | 155 | static int __init s5pc100_core_init(void) |
155 | { | 156 | { |
156 | return sysdev_class_register(&s5pc100_sysclass); | 157 | return subsys_system_register(&s5pc100_subsys, NULL); |
157 | } | 158 | } |
158 | 159 | ||
159 | core_initcall(s5pc100_core_init); | 160 | core_initcall(s5pc100_core_init); |
@@ -165,5 +166,5 @@ int __init s5pc100_init(void) | |||
165 | /* set idle function */ | 166 | /* set idle function */ |
166 | pm_idle = s5pc100_idle; | 167 | pm_idle = s5pc100_idle; |
167 | 168 | ||
168 | return sysdev_register(&s5pc100_sysdev); | 169 | return device_register(&s5pc100_dev); |
169 | } | 170 | } |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index 4c5ac7a69e9e..6a1e5876bb84 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/cpu.c b/arch/arm/mach-s5pv210/cpu.c index 84ec74633232..28e71efb388e 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/cpu.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.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/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/dma-mapping.h> | 23 | #include <linux/dma-mapping.h> |
@@ -174,17 +174,18 @@ void __init s5pv210_init_irq(void) | |||
174 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | 174 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
175 | } | 175 | } |
176 | 176 | ||
177 | struct sysdev_class s5pv210_sysclass = { | 177 | struct bus_type s5pv210_subsys = { |
178 | .name = "s5pv210-core", | 178 | .name = "s5pv210-core", |
179 | .dev_name = "s5pv210-core", | ||
179 | }; | 180 | }; |
180 | 181 | ||
181 | static struct sys_device s5pv210_sysdev = { | 182 | static struct device s5pv210_dev = { |
182 | .cls = &s5pv210_sysclass, | 183 | .bus = &s5pv210_subsys, |
183 | }; | 184 | }; |
184 | 185 | ||
185 | static int __init s5pv210_core_init(void) | 186 | static int __init s5pv210_core_init(void) |
186 | { | 187 | { |
187 | return sysdev_class_register(&s5pv210_sysclass); | 188 | return subsys_system_register(&s5pv210_subsys, NULL); |
188 | } | 189 | } |
189 | 190 | ||
190 | core_initcall(s5pv210_core_init); | 191 | core_initcall(s5pv210_core_init); |
@@ -199,5 +200,5 @@ int __init s5pv210_init(void) | |||
199 | /* set sw_reset function */ | 200 | /* set sw_reset function */ |
200 | s5p_reset_hook = s5pv210_sw_reset; | 201 | s5p_reset_hook = s5pv210_sw_reset; |
201 | 202 | ||
202 | return sysdev_register(&s5pv210_sysdev); | 203 | return device_register(&s5pv210_dev); |
203 | } | 204 | } |
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index f7266bb0cac8..05cf7dc61286 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/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 8662ef6e5681..69a99db6cc83 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 e340a54251df..3a4893b82ad1 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 fda4866703cd..07b9122ff84f 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 feaf9cbe60f6..8d8b80e79e03 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 1fafc3244607..de5a2384284b 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 7bf143c443f1..f47e29586a01 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 40fd7b6b5e66..0122a22eb732 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -185,20 +185,20 @@ extern struct syscore_ops s3c2416_pm_syscore_ops; | |||
185 | extern struct syscore_ops s3c244x_pm_syscore_ops; | 185 | extern struct syscore_ops s3c244x_pm_syscore_ops; |
186 | extern struct syscore_ops s3c64xx_irq_syscore_ops; | 186 | extern struct syscore_ops s3c64xx_irq_syscore_ops; |
187 | 187 | ||
188 | /* system device classes */ | 188 | /* system device subsystems */ |
189 | 189 | ||
190 | extern struct sysdev_class s3c2410_sysclass; | 190 | extern struct bus_type s3c2410_subsys; |
191 | extern struct sysdev_class s3c2410a_sysclass; | 191 | extern struct bus_type s3c2410a_subsys; |
192 | extern struct sysdev_class s3c2412_sysclass; | 192 | extern struct bus_type s3c2412_subsys; |
193 | extern struct sysdev_class s3c2416_sysclass; | 193 | extern struct bus_type s3c2416_subsys; |
194 | extern struct sysdev_class s3c2440_sysclass; | 194 | extern struct bus_type s3c2440_subsys; |
195 | extern struct sysdev_class s3c2442_sysclass; | 195 | extern struct bus_type s3c2442_subsys; |
196 | extern struct sysdev_class s3c2443_sysclass; | 196 | extern struct bus_type s3c2443_subsys; |
197 | extern struct sysdev_class s3c6410_sysclass; | 197 | extern struct bus_type s3c6410_subsys; |
198 | extern struct sysdev_class s3c64xx_sysclass; | 198 | extern struct bus_type s3c64xx_subsys; |
199 | extern struct sysdev_class s5p64x0_sysclass; | 199 | extern struct bus_type s5p64x0_subsys; |
200 | extern struct sysdev_class s5pv210_sysclass; | 200 | extern struct bus_type s5pv210_subsys; |
201 | extern struct sysdev_class exynos4_sysclass; | 201 | extern struct bus_type exynos4_subsys; |
202 | 202 | ||
203 | extern void (*s5pc1xx_idle)(void); | 203 | extern void (*s5pc1xx_idle)(void); |
204 | 204 | ||
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> |