diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-12-21 19:01:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-21 19:01:38 -0500 |
commit | 4a858cfc9af87cc60b3113c3b7b377a4305eac6a (patch) | |
tree | 22ab8aa44aab760d2e1afcb8559e4debe6092d28 /arch/arm/mach-s3c2410 | |
parent | 8f1e938db9230d9f828420adea96f691c722e473 (diff) |
arm: convert sysdev_class to a regular subsystem
After all sysdev classes are ported to regular driver core entities, the
sysdev implementation will be entirely removed from the kernel.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Boojin Kim <boojin.kim@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r-- | arch/arm/mach-s3c2410/cpu-freq.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/dma.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/dma.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/pll.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/pm.c | 36 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/s3c2410.c | 24 |
6 files changed, 80 insertions, 58 deletions
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/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..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 | ||
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 | } |