aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-12-21 19:01:38 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-21 19:01:38 -0500
commit4a858cfc9af87cc60b3113c3b7b377a4305eac6a (patch)
tree22ab8aa44aab760d2e1afcb8559e4debe6092d28 /arch
parent8f1e938db9230d9f828420adea96f691c722e473 (diff)
arm: convert sysdev_class to a regular subsystem
After all sysdev classes are ported to regular driver core entities, the sysdev implementation will be entirely removed from the kernel. Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Boojin Kim <boojin.kim@samsung.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/mach/time.h2
-rw-r--r--arch/arm/mach-exynos/cpu.c15
-rw-r--r--arch/arm/mach-exynos/pm.c10
-rw-r--r--arch/arm/mach-s3c2410/cpu-freq.c26
-rw-r--r--arch/arm/mach-s3c2410/dma.c28
-rw-r--r--arch/arm/mach-s3c2410/include/mach/dma.h4
-rw-r--r--arch/arm/mach-s3c2410/pll.c20
-rw-r--r--arch/arm/mach-s3c2410/pm.c36
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.c24
-rw-r--r--arch/arm/mach-s3c2412/cpu-freq.c13
-rw-r--r--arch/arm/mach-s3c2412/dma.c12
-rw-r--r--arch/arm/mach-s3c2412/irq.c12
-rw-r--r--arch/arm/mach-s3c2412/pm.c12
-rw-r--r--arch/arm/mach-s3c2412/s3c2412.c15
-rw-r--r--arch/arm/mach-s3c2416/irq.c12
-rw-r--r--arch/arm/mach-s3c2416/pm.c12
-rw-r--r--arch/arm/mach-s3c2416/s3c2416.c15
-rw-r--r--arch/arm/mach-s3c2440/clock.c15
-rw-r--r--arch/arm/mach-s3c2440/dma.c12
-rw-r--r--arch/arm/mach-s3c2440/irq.c12
-rw-r--r--arch/arm/mach-s3c2440/s3c2440-cpufreq.c22
-rw-r--r--arch/arm/mach-s3c2440/s3c2440-pll-12000000.c20
-rw-r--r--arch/arm/mach-s3c2440/s3c2440-pll-16934400.c24
-rw-r--r--arch/arm/mach-s3c2440/s3c2440.c8
-rw-r--r--arch/arm/mach-s3c2440/s3c2442.c17
-rw-r--r--arch/arm/mach-s3c2440/s3c244x-clock.c19
-rw-r--r--arch/arm/mach-s3c2440/s3c244x-irq.c20
-rw-r--r--arch/arm/mach-s3c2440/s3c244x.c16
-rw-r--r--arch/arm/mach-s3c2443/dma.c12
-rw-r--r--arch/arm/mach-s3c2443/irq.c12
-rw-r--r--arch/arm/mach-s3c2443/s3c2443.c15
-rw-r--r--arch/arm/mach-s3c64xx/cpu.c19
-rw-r--r--arch/arm/mach-s3c64xx/dma.c23
-rw-r--r--arch/arm/mach-s3c64xx/s3c6400.c15
-rw-r--r--arch/arm/mach-s3c64xx/s3c6410.c15
-rw-r--r--arch/arm/mach-s5p64x0/cpu.c15
-rw-r--r--arch/arm/mach-s5p64x0/pm.c10
-rw-r--r--arch/arm/mach-s5pc100/cpu.c15
-rw-r--r--arch/arm/mach-s5pv210/cpu.c15
-rw-r--r--arch/arm/mach-s5pv210/pm.c10
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h28
-rw-r--r--arch/arm/plat-samsung/include/plat/dma-s3c24xx.h2
-rw-r--r--arch/arm/plat-samsung/include/plat/pm.h2
43 files changed, 368 insertions, 293 deletions
diff --git a/arch/arm/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h
index d5adaae5ee2c..1953e1b7a53f 100644
--- a/arch/arm/include/asm/mach/time.h
+++ b/arch/arm/include/asm/mach/time.h
@@ -10,7 +10,7 @@
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> 13#include <linux/device.h>
14 14
15/* 15/*
16 * This is our kernel timer structure. 16 * This is our kernel timer structure.
diff --git a/arch/arm/mach-exynos/cpu.c b/arch/arm/mach-exynos/cpu.c
index 90ec247f3b37..d4c41f349bcc 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>
@@ -243,17 +243,18 @@ void __init exynos4_init_irq(void)
243 s5p_init_irq(NULL, 0); 243 s5p_init_irq(NULL, 0);
244} 244}
245 245
246struct sysdev_class exynos4_sysclass = { 246struct bus_type exynos4_subsys = {
247 .name = "exynos4-core", 247 .name = "exynos4-core",
248 .dev_name = "exynos4-core",
248}; 249};
249 250
250static struct sys_device exynos4_sysdev = { 251static struct device exynos4_dev = {
251 .cls = &exynos4_sysclass, 252 .bus = &exynos4_subsys,
252}; 253};
253 254
254static int __init exynos4_core_init(void) 255static int __init exynos4_core_init(void)
255{ 256{
256 return sysdev_class_register(&exynos4_sysclass); 257 return subsys_system_register(&exynos4_subsys, NULL);
257} 258}
258core_initcall(exynos4_core_init); 259core_initcall(exynos4_core_init);
259 260
@@ -294,5 +295,5 @@ int __init exynos_init(void)
294 if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) 295 if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412())
295 s5p_reset_hook = exynos4_sw_reset; 296 s5p_reset_hook = exynos4_sw_reset;
296 297
297 return sysdev_register(&exynos4_sysdev); 298 return device_register(&exynos4_dev);
298} 299}
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
208static int exynos4_pm_add(struct sys_device *sysdev) 208static 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
304static struct sysdev_driver exynos4_pm_driver = { 304static 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
308static __init int exynos4_pm_drvinit(void) 310static __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}
330arch_initcall(exynos4_pm_drvinit); 332arch_initcall(exynos4_pm_drvinit);
331 333
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
118static int s3c2410_cpufreq_add(struct sys_device *sysdev) 118static 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
123static struct sysdev_driver s3c2410_cpufreq_driver = { 123static 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
127static int __init s3c2410_cpufreq_init(void) 129static 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
133arch_initcall(s3c2410_cpufreq_init); 134arch_initcall(s3c2410_cpufreq_init);
134 135
135static int s3c2410a_cpufreq_add(struct sys_device *sysdev) 136static 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
149static struct sysdev_driver s3c2410a_cpufreq_driver = { 150static 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
153static int __init s3c2410a_cpufreq_init(void) 156static 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
159arch_initcall(s3c2410a_cpufreq_init); 161arch_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
135static int __init s3c2410_dma_add(struct sys_device *sysdev) 135static 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)
143static struct sysdev_driver s3c2410_dma_driver = { 143static 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
147static int __init s3c2410_dma_drvinit(void) 149static 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
152arch_initcall(s3c2410_dma_drvinit); 154arch_initcall(s3c2410_dma_drvinit);
153 155
154static struct sysdev_driver s3c2410a_dma_driver = { 156static 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
158static int __init s3c2410a_dma_drvinit(void) 162static 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
163arch_initcall(s3c2410a_dma_drvinit); 167arch_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 */
168static struct sysdev_driver s3c2442_dma_driver = { 172static 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
172static int __init s3c2442_dma_drvinit(void) 178static 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
177arch_initcall(s3c2442_dma_drvinit); 183arch_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
208typedef unsigned long dma_device_t; 208typedef unsigned long dma_device_t;
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
69static int s3c2410_plls_add(struct sys_device *dev) 69static 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
74static struct sysdev_driver s3c2410_plls_drv = { 74static 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
78static int __init s3c2410_pll_init(void) 80static 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
84arch_initcall(s3c2410_pll_init); 86arch_initcall(s3c2410_pll_init);
85 87
86static struct sysdev_driver s3c2410a_plls_drv = { 88static 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
90static int __init s3c2410a_pll_init(void) 94static 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
95arch_initcall(s3c2410a_pll_init); 99arch_initcall(s3c2410a_pll_init);
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c
index 4728f9aa7df1..4b948eca73ef 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
114static int s3c2410_pm_add(struct sys_device *dev) 114static 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)
123static struct sysdev_driver s3c2410_pm_driver = { 123static 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
129static int __init s3c2410_pm_drvinit(void) 131static 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
134arch_initcall(s3c2410_pm_drvinit); 136arch_initcall(s3c2410_pm_drvinit);
135 137
136static struct sysdev_driver s3c2410a_pm_driver = { 138static 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
140static int __init s3c2410a_pm_drvinit(void) 144static 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
145arch_initcall(s3c2410a_pm_drvinit); 149arch_initcall(s3c2410a_pm_drvinit);
146#endif 150#endif
147 151
148#if defined(CONFIG_CPU_S3C2440) 152#if defined(CONFIG_CPU_S3C2440)
149static struct sysdev_driver s3c2440_pm_driver = { 153static 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
153static int __init s3c2440_pm_drvinit(void) 159static 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
158arch_initcall(s3c2440_pm_drvinit); 164arch_initcall(s3c2440_pm_drvinit);
159#endif 165#endif
160 166
161#if defined(CONFIG_CPU_S3C2442) 167#if defined(CONFIG_CPU_S3C2442)
162static struct sysdev_driver s3c2442_pm_driver = { 168static 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
166static int __init s3c2442_pm_drvinit(void) 174static 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
171arch_initcall(s3c2442_pm_drvinit); 179arch_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
134struct sysdev_class s3c2410_sysclass = { 134struct 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 */
141struct sysdev_class s3c2410a_sysclass = { 142struct bus_type s3c2410a_subsys = {
142 .name = "s3c2410a-core", 143 .name = "s3c2410a-core",
144 .dev_name = "s3c2410a-core",
143}; 145};
144 146
145static struct sys_device s3c2410_sysdev = { 147static 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
155static int __init s3c2410_core_init(void) 157static 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
160core_initcall(s3c2410_core_init); 162core_initcall(s3c2410_core_init);
161 163
162static int __init s3c2410a_core_init(void) 164static 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
167core_initcall(s3c2410a_core_init); 169core_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
181int __init s3c2410a_init(void) 183int __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/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
197static int s3c2412_cpufreq_add(struct sys_device *sysdev) 197static 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
247static struct sysdev_driver s3c2412_cpufreq_driver = { 247static 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
251static int s3c2412_cpufreq_init(void) 253static 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
257arch_initcall(s3c2412_cpufreq_init); 258arch_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
162static int __init s3c2412_dma_add(struct sys_device *sysdev) 162static 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
168static struct sysdev_driver s3c2412_dma_driver = { 168static 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
172static int __init s3c2412_dma_init(void) 174static 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
177arch_initcall(s3c2412_dma_init); 179arch_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
171static struct irq_chip s3c2412_irq_rtc_chip; 171static struct irq_chip s3c2412_irq_rtc_chip;
172 172
173static int s3c2412_irq_add(struct sys_device *sysdev) 173static 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
203static struct sysdev_driver s3c2412_irq_driver = { 203static 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
207static int s3c2412_irq_init(void) 209static 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
212arch_initcall(s3c2412_irq_init); 214arch_initcall(s3c2412_irq_init);
diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c
index f4077efa51fa..fd7210d74db9 100644
--- a/arch/arm/mach-s3c2412/pm.c
+++ b/arch/arm/mach-s3c2412/pm.c
@@ -16,7 +16,7 @@
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/sysdev.h> 19#include <linux/device.h>
20#include <linux/syscore_ops.h> 20#include <linux/syscore_ops.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/io.h> 22#include <linux/io.h>
@@ -56,7 +56,7 @@ static void s3c2412_pm_prepare(void)
56{ 56{
57} 57}
58 58
59static int s3c2412_pm_add(struct sys_device *sysdev) 59static 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
90static struct sysdev_driver s3c2412_pm_driver = { 90static 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
94static __init int s3c2412_pm_init(void) 96static __init int s3c2412_pm_init(void)
95{ 97{
96 return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_pm_driver); 98 return subsys_interface_register_register(&s3c2412_pm_interface);
97} 99}
98 100
99arch_initcall(s3c2412_pm_init); 101arch_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
229struct sysdev_class s3c2412_sysclass = { 229struct bus_type s3c2412_subsys = {
230 .name = "s3c2412-core", 230 .name = "s3c2412-core",
231 .dev_name = "s3c2412-core",
231}; 232};
232 233
233static int __init s3c2412_core_init(void) 234static 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
238core_initcall(s3c2412_core_init); 239core_initcall(s3c2412_core_init);
239 240
240static struct sys_device s3c2412_sysdev = { 241static struct device s3c2412_dev = {
241 .cls = &s3c2412_sysclass, 242 .bus = &s3c2412_subsys,
242}; 243};
243 244
244int __init s3c2412_init(void) 245int __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
216static int __init s3c2416_irq_add(struct sys_device *sysdev) 216static 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
237static struct sysdev_driver s3c2416_irq_driver = { 237static 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
241static int __init s3c2416_irq_init(void) 243static 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
246arch_initcall(s3c2416_irq_init); 248arch_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
51static int s3c2416_pm_add(struct sys_device *sysdev) 51static 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
59static struct sysdev_driver s3c2416_pm_driver = { 59static 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
63static __init int s3c2416_pm_init(void) 65static __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
68arch_initcall(s3c2416_pm_init); 70arch_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
71struct sysdev_class s3c2416_sysclass = { 71struct bus_type s3c2416_subsys = {
72 .name = "s3c2416-core", 72 .name = "s3c2416-core",
73 .dev_name = "s3c2416-core",
73}; 74};
74 75
75static struct sys_device s3c2416_sysdev = { 76static struct device s3c2416_dev = {
76 .cls = &s3c2416_sysclass, 77 .bus = &s3c2416_subsys,
77}; 78};
78 79
79static void s3c2416_hard_reset(void) 80static 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
111void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) 112void __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
142static int __init s3c2416_core_init(void) 143static 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
147core_initcall(s3c2416_core_init); 148core_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
111static int s3c2440_clk_add(struct sys_device *sysdev) 110static 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
140static struct sysdev_driver s3c2440_clk_driver = { 139static 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
144static __init int s3c24xx_clk_driver(void) 145static __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
149arch_initcall(s3c24xx_clk_driver); 150arch_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
177static int __init s3c2440_dma_add(struct sys_device *sysdev) 177static 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
184static struct sysdev_driver s3c2440_dma_driver = { 184static 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
188static int __init s3c2440_dma_init(void) 190static 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
193arch_initcall(s3c2440_dma_init); 195arch_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
95static int s3c2440_irq_add(struct sys_device *sysdev) 95static 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
116static struct sysdev_driver s3c2440_irq_driver = { 116static 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
120static int s3c2440_irq_init(void) 122static 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
125arch_initcall(s3c2440_irq_init); 127arch_initcall(s3c2440_irq_init);
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
273static int s3c2440_cpufreq_add(struct sys_device *sysdev) 273static 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
288static struct sysdev_driver s3c2440_cpufreq_driver = { 288static 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
292static int s3c2440_cpufreq_init(void) 294static 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. */
299subsys_initcall(s3c2440_cpufreq_init); 300subsys_initcall(s3c2440_cpufreq_init);
300 301
301static struct sysdev_driver s3c2442_cpufreq_driver = { 302static 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
305static int s3c2442_cpufreq_init(void) 308static 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
311subsys_initcall(s3c2442_cpufreq_init); 313subsys_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
54static int s3c2440_plls12_add(struct sys_device *dev) 54static 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
75static struct sysdev_driver s3c2440_plls12_drv = { 75static 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
79static int __init s3c2440_pll_12mhz(void) 81static 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
85arch_initcall(s3c2440_pll_12mhz); 87arch_initcall(s3c2440_pll_12mhz);
86 88
87static struct sysdev_driver s3c2442_plls12_drv = { 89static 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
91static int __init s3c2442_pll_12mhz(void) 95static 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
82static int s3c2440_plls169344_add(struct sys_device *dev) 82static 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
103static struct sysdev_driver s3c2440_plls169344_drv = { 103static 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
107static int __init s3c2440_pll_16934400(void) 109static 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
114arch_initcall(s3c2440_pll_16934400); 114arch_initcall(s3c2440_pll_16934400);
115 115
116static struct sysdev_driver s3c2442_plls169344_drv = { 116static 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
120static int __init s3c2442_pll_16934400(void) 122static 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
127arch_initcall(s3c2442_pll_16934400); 127arch_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
43static struct sys_device s3c2440_sysdev = { 43static struct device s3c2440_dev = {
44 .cls = &s3c2440_sysclass, 44 .bus = &s3c2440_subsys,
45}; 45};
46 46
47int __init s3c2440_init(void) 47int __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
69void __init s3c2440_map_io(void) 69void __init s3c2440_map_io(void)
diff --git a/arch/arm/mach-s3c2440/s3c2442.c b/arch/arm/mach-s3c2440/s3c2442.c
index 2c822e09392f..9ab15cdea706 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
126static int s3c2442_clk_add(struct sys_device *sysdev) 125static 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
152static struct sysdev_driver s3c2442_clk_driver = { 151static 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
156static __init int s3c2442_clk_init(void) 157static __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
161arch_initcall(s3c2442_clk_init); 162arch_initcall(s3c2442_clk_init);
162 163
163 164
164static struct sys_device s3c2442_sysdev = { 165static struct device s3c2442_dev = {
165 .cls = &s3c2442_sysclass, 166 .bus = &s3c2442_subsys,
166}; 167};
167 168
168int __init s3c2442_init(void) 169int __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
181void __init s3c2442_map_io(void) 182void __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
76static int s3c244x_clk_add(struct sys_device *sysdev) 75static 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
118static struct sysdev_driver s3c2440_clk_driver = { 117static 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
122static int s3c2440_clk_init(void) 123static 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
127arch_initcall(s3c2440_clk_init); 128arch_initcall(s3c2440_clk_init);
128 129
129static struct sysdev_driver s3c2442_clk_driver = { 130static 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
133static int s3c2442_clk_init(void) 136static 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
138arch_initcall(s3c2442_clk_init); 141arch_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
94static int s3c244x_irq_add(struct sys_device *sysdev) 94static 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
117static struct sysdev_driver s3c2440_irq_driver = { 117static 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
121static int s3c2440_irq_init(void) 123static 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
126arch_initcall(s3c2440_irq_init); 128arch_initcall(s3c2440_irq_init);
127 129
128static struct sysdev_driver s3c2442_irq_driver = { 130static 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
133static int s3c2442_irq_init(void) 137static 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
138arch_initcall(s3c2442_irq_init); 142arch_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
140struct sysdev_class s3c2440_sysclass = { 140struct bus_type s3c2440_subsys = {
141 .name = "s3c2440-core", 141 .name = "s3c2440-core",
142 .dev_name = "s3c2440-core",
142}; 143};
143 144
144struct sysdev_class s3c2442_sysclass = { 145struct 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
154static int __init s3c2440_core_init(void) 156static 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
159core_initcall(s3c2440_core_init); 161core_initcall(s3c2440_core_init);
160 162
161static int __init s3c2442_core_init(void) 163static 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
166core_initcall(s3c2442_core_init); 168core_initcall(s3c2442_core_init);
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
138static int __init s3c2443_dma_add(struct sys_device *sysdev) 138static 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
144static struct sysdev_driver s3c2443_dma_driver = { 144static 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
148static int __init s3c2443_dma_init(void) 150static 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
153arch_initcall(s3c2443_dma_init); 155arch_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
244static int __init s3c2443_irq_add(struct sys_device *sysdev) 244static 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
268static struct sysdev_driver s3c2443_irq_driver = { 268static 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
272static int __init s3c2443_irq_init(void) 274static 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
277arch_initcall(s3c2443_irq_init); 279arch_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
52struct sysdev_class s3c2443_sysclass = { 52struct bus_type s3c2443_subsys = {
53 .name = "s3c2443-core", 53 .name = "s3c2443-core",
54 .dev_name = "s3c2443-core",
54}; 55};
55 56
56static struct sys_device s3c2443_sysdev = { 57static struct device s3c2443_dev = {
57 .cls = &s3c2443_sysclass, 58 .bus = &s3c2443_subsys,
58}; 59};
59 60
60static void s3c2443_hard_reset(void) 61static 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
83void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no) 84void __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
108static int __init s3c2443_core_init(void) 109static 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
113core_initcall(s3c2443_core_init); 114core_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
125struct sysdev_class s3c64xx_sysclass = { 125struct bus_type s3c64xx_subsys = {
126 .name = "s3c64xx-core", 126 .name = "s3c64xx-core",
127 .dev_name = "s3c64xx-core",
127}; 128};
128 129
129static struct sys_device s3c64xx_sysdev = { 130static 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
155static __init int s3c64xx_sysdev_init(void) 156static __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
161core_initcall(s3c64xx_sysdev_init); 162core_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
37struct s3c64xx_dmac { 37struct 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
634static struct sysdev_class dma_sysclass = { 634static struct bus_type dma_subsys = {
635 .name = "s3c64xx-dma", 635 .name = "s3c64xx-dma",
636 .dev_name = "s3c64xx-dma",
636}; 637};
637 638
638static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, 639static 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:
715err_map: 716err_map:
716 iounmap(regs); 717 iounmap(regs);
717err_dev: 718err_dev:
718 sysdev_unregister(&dmac->sysdev); 719 device_unregister(&dmac->dev);
719err_alloc: 720err_alloc:
720 kfree(dmac); 721 kfree(dmac);
721 return err; 722 return err;
@@ -733,9 +734,9 @@ static int __init s3c64xx_dma_init(void)
733 return -ENOMEM; 734 return -ENOMEM;
734 } 735 }
735 736
736 ret = sysdev_class_register(&dma_sysclass); 737 ret = subsys_system_register(&dma_subsys, NULL);
737 if (ret) { 738 if (ret) {
738 printk(KERN_ERR "%s: failed to create sysclass\n", __func__); 739 printk(KERN_ERR "%s: failed to create subsys\n", __func__);
739 return -ENOMEM; 740 return -ENOMEM;
740 } 741 }
741 742
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c
index 7a3bc32df425..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
73struct sysdev_class s3c6400_sysclass = { 73static struct bus_type s3c6400_subsys = {
74 .name = "s3c6400-core", 74 .name = "s3c6400-core",
75 .dev_name = "s3c6400-core",
75}; 76};
76 77
77static struct sys_device s3c6400_sysdev = { 78static struct device s3c6400_dev = {
78 .cls = &s3c6400_sysclass, 79 .bus = &s3c6400_subsys,
79}; 80};
80 81
81static int __init s3c6400_core_init(void) 82static 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
86core_initcall(s3c6400_core_init); 87core_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
78struct sysdev_class s3c6410_sysclass = { 78struct bus_type s3c6410_subsys = {
79 .name = "s3c6410-core", 79 .name = "s3c6410-core",
80 .dev_name = "s3c6410-core",
80}; 81};
81 82
82static struct sys_device s3c6410_sysdev = { 83static struct device s3c6410_dev = {
83 .cls = &s3c6410_sysclass, 84 .bus = &s3c6410_subsys,
84}; 85};
85 86
86static int __init s3c6410_core_init(void) 87static 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
91core_initcall(s3c6410_core_init); 92core_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/cpu.c b/arch/arm/mach-s5p64x0/cpu.c
index ecab40cf19ab..8b029901d919 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
193struct sysdev_class s5p64x0_sysclass = { 193struct bus_type s5p64x0_subsys = {
194 .name = "s5p64x0-core", 194 .name = "s5p64x0-core",
195 .dev_name = "s5p64x0-core",
195}; 196};
196 197
197static struct sys_device s5p64x0_sysdev = { 198static struct device s5p64x0_subsys = {
198 .cls = &s5p64x0_sysclass, 199 .bus = &s5p64x0_subsys,
199}; 200};
200 201
201static int __init s5p64x0_core_init(void) 202static 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}
205core_initcall(s5p64x0_core_init); 206core_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
163static int s5p64x0_pm_add(struct sys_device *sysdev) 163static 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
172static struct sysdev_driver s5p64x0_pm_driver = { 172static 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
176static __init int s5p64x0_pm_drvinit(void) 178static __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}
182arch_initcall(s5p64x0_pm_drvinit); 184arch_initcall(s5p64x0_pm_drvinit);
183 185
diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c
index fd2708e7d8a9..af52c09291b1 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
146static struct sysdev_class s5pc100_sysclass = { 146static struct bus_type s5pc100_subsys = {
147 .name = "s5pc100-core", 147 .name = "s5pc100-core",
148 .dev_name = "s5pc100-core",
148}; 149};
149 150
150static struct sys_device s5pc100_sysdev = { 151static struct device s5pc100_dev = {
151 .cls = &s5pc100_sysclass, 152 .bus = &s5pc100_subsys,
152}; 153};
153 154
154static int __init s5pc100_core_init(void) 155static 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
159core_initcall(s5pc100_core_init); 160core_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_sys);
169} 170}
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
177struct sysdev_class s5pv210_sysclass = { 177struct bus_type s5pv210_subsys = {
178 .name = "s5pv210-core", 178 .name = "s5pv210-core",
179 .dev_name = "s5pv210-core",
179}; 180};
180 181
181static struct sys_device s5pv210_sysdev = { 182static struct device s5pv210_dev = {
182 .cls = &s5pv210_sysclass, 183 .bus = &s5pv210_subsys,
183}; 184};
184 185
185static int __init s5pv210_core_init(void) 186static 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
190core_initcall(s5pv210_core_init); 191core_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/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
136static int s5pv210_pm_add(struct sys_device *sysdev) 136static 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
144static struct sysdev_driver s5pv210_pm_driver = { 144static 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
148static __init int s5pv210_pm_drvinit(void) 150static __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}
152arch_initcall(s5pv210_pm_drvinit); 154arch_initcall(s5pv210_pm_drvinit);
153 155
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;
185extern struct syscore_ops s3c244x_pm_syscore_ops; 185extern struct syscore_ops s3c244x_pm_syscore_ops;
186extern struct syscore_ops s3c64xx_irq_syscore_ops; 186extern struct syscore_ops s3c64xx_irq_syscore_ops;
187 187
188/* system device classes */ 188/* system device subsystems */
189 189
190extern struct sysdev_class s3c2410_sysclass; 190extern struct bus_type s3c2410_subsys;
191extern struct sysdev_class s3c2410a_sysclass; 191extern struct bus_type s3c2410a_subsys;
192extern struct sysdev_class s3c2412_sysclass; 192extern struct bus_type s3c2412_subsys;
193extern struct sysdev_class s3c2416_sysclass; 193extern struct bus_type s3c2416_subsys;
194extern struct sysdev_class s3c2440_sysclass; 194extern struct bus_type s3c2440_subsys;
195extern struct sysdev_class s3c2442_sysclass; 195extern struct bus_type s3c2442_subsys;
196extern struct sysdev_class s3c2443_sysclass; 196extern struct bus_type s3c2443_subsys;
197extern struct sysdev_class s3c6410_sysclass; 197extern struct bus_type s3c6410_subsys;
198extern struct sysdev_class s3c64xx_sysclass; 198extern struct bus_type s3c64xx_subsys;
199extern struct sysdev_class s5p64x0_sysclass; 199extern struct bus_type s5p64x0_subsys;
200extern struct sysdev_class s5pv210_sysclass; 200extern struct bus_type s5pv210_subsys;
201extern struct sysdev_class exynos4_sysclass; 201extern struct bus_type exynos4_subsys;
202 202
203extern void (*s5pc1xx_idle)(void); 203extern 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
15extern struct sysdev_class dma_sysclass; 15extern struct bus_type dma_subsys;
16extern struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; 16extern 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
20struct sys_device; 20struct device;
21 21
22#ifdef CONFIG_PM 22#ifdef CONFIG_PM
23 23