aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/s3c2410.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2410/s3c2410.c')
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c
index 489c826e92a..eea559ec7a5 100644
--- a/arch/arm/mach-s3c2410/s3c2410.c
+++ b/arch/arm/mach-s3c2410/s3c2410.c
@@ -18,7 +18,7 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/sysdev.h> 21#include <linux/device.h>
22#include <linux/syscore_ops.h> 22#include <linux/syscore_ops.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
@@ -132,22 +132,24 @@ void __init s3c2410_init_clocks(int xtal)
132 s3c24xx_register_clock(&s3c2410_armclk); 132 s3c24xx_register_clock(&s3c2410_armclk);
133} 133}
134 134
135struct sysdev_class s3c2410_sysclass = { 135struct bus_type s3c2410_subsys = {
136 .name = "s3c2410-core", 136 .name = "s3c2410-core",
137 .dev_name = "s3c2410-core",
137}; 138};
138 139
139/* Note, we would have liked to name this s3c2410-core, but we cannot 140/* Note, we would have liked to name this s3c2410-core, but we cannot
140 * register two sysdev_class with the same name. 141 * register two subsystems with the same name.
141 */ 142 */
142struct sysdev_class s3c2410a_sysclass = { 143struct bus_type s3c2410a_subsys = {
143 .name = "s3c2410a-core", 144 .name = "s3c2410a-core",
145 .dev_name = "s3c2410a-core",
144}; 146};
145 147
146static struct sys_device s3c2410_sysdev = { 148static struct device s3c2410_dev = {
147 .cls = &s3c2410_sysclass, 149 .bus = &s3c2410_subsys,
148}; 150};
149 151
150/* need to register class before we actually register the device, and 152/* need to register the subsystem before we actually register the device, and
151 * we also need to ensure that it has been initialised before any of the 153 * we also need to ensure that it has been initialised before any of the
152 * drivers even try to use it (even if not on an s3c2410 based system) 154 * drivers even try to use it (even if not on an s3c2410 based system)
153 * as a driver which may support both 2410 and 2440 may try and use it. 155 * as a driver which may support both 2410 and 2440 may try and use it.
@@ -155,14 +157,14 @@ static struct sys_device s3c2410_sysdev = {
155 157
156static int __init s3c2410_core_init(void) 158static int __init s3c2410_core_init(void)
157{ 159{
158 return sysdev_class_register(&s3c2410_sysclass); 160 return subsys_system_register(&s3c2410_subsys, NULL);
159} 161}
160 162
161core_initcall(s3c2410_core_init); 163core_initcall(s3c2410_core_init);
162 164
163static int __init s3c2410a_core_init(void) 165static int __init s3c2410a_core_init(void)
164{ 166{
165 return sysdev_class_register(&s3c2410a_sysclass); 167 return subsys_system_register(&s3c2410a_subsys, NULL);
166} 168}
167 169
168core_initcall(s3c2410a_core_init); 170core_initcall(s3c2410a_core_init);
@@ -176,12 +178,12 @@ int __init s3c2410_init(void)
176#endif 178#endif
177 register_syscore_ops(&s3c24xx_irq_syscore_ops); 179 register_syscore_ops(&s3c24xx_irq_syscore_ops);
178 180
179 return sysdev_register(&s3c2410_sysdev); 181 return device_register(&s3c2410_dev);
180} 182}
181 183
182int __init s3c2410a_init(void) 184int __init s3c2410a_init(void)
183{ 185{
184 s3c2410_sysdev.cls = &s3c2410a_sysclass; 186 s3c2410_dev.bus = &s3c2410a_subsys;
185 return s3c2410_init(); 187 return s3c2410_init();
186} 188}
187 189