aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2443
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/arm/mach-s3c2443
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/arm/mach-s3c2443')
-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
3 files changed, 22 insertions, 17 deletions
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);