From 4a858cfc9af87cc60b3113c3b7b377a4305eac6a Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 21 Dec 2011 16:01:38 -0800 Subject: 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 Cc: Russell King Cc: Ben Dooks Cc: Vinod Koul Cc: Boojin Kim Cc: Linus Walleij Cc: Lucas De Marchi Cc: Heiko Stuebner Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-s3c2416/irq.c | 12 +++++++----- arch/arm/mach-s3c2416/pm.c | 12 +++++++----- arch/arm/mach-s3c2416/s3c2416.c | 15 ++++++++------- 3 files changed, 22 insertions(+), 17 deletions(-) (limited to 'arch/arm/mach-s3c2416') 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 @@ #include #include #include -#include +#include #include #include @@ -213,7 +213,7 @@ static int __init s3c2416_add_sub(unsigned int base, return 0; } -static int __init s3c2416_irq_add(struct sys_device *sysdev) +static int __init s3c2416_irq_add(struct device *dev) { printk(KERN_INFO "S3C2416: IRQ Support\n"); @@ -234,13 +234,15 @@ static int __init s3c2416_irq_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2416_irq_driver = { - .add = s3c2416_irq_add, +static struct subsys_interface s3c2416_irq_interface = { + .name = "s3c2416_irq", + .subsys = &s3c2416_subsys, + .add_dev = s3c2416_irq_add, }; static int __init s3c2416_irq_init(void) { - return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_irq_driver); + return subsys_interface_register(&s3c2416_irq_interface); } arch_initcall(s3c2416_irq_init); diff --git a/arch/arm/mach-s3c2416/pm.c b/arch/arm/mach-s3c2416/pm.c index 9ec54f1d8e75..3bdb15a0d419 100644 --- a/arch/arm/mach-s3c2416/pm.c +++ b/arch/arm/mach-s3c2416/pm.c @@ -10,7 +10,7 @@ * published by the Free Software Foundation. */ -#include +#include #include #include @@ -48,7 +48,7 @@ static void s3c2416_pm_prepare(void) __raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1); } -static int s3c2416_pm_add(struct sys_device *sysdev) +static int s3c2416_pm_add(struct device *dev) { pm_cpu_prep = s3c2416_pm_prepare; pm_cpu_sleep = s3c2416_cpu_suspend; @@ -56,13 +56,15 @@ static int s3c2416_pm_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2416_pm_driver = { - .add = s3c2416_pm_add, +static struct subsys_interface s3c2416_pm_interface = { + .name = "s3c2416_pm", + .subsys = &s3c2416_subsys, + .add_dev = s3c2416_pm_add, }; static __init int s3c2416_pm_init(void) { - return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_pm_driver); + return subsys_interface_register(&s3c2416_pm_interface); } arch_initcall(s3c2416_pm_init); diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index ee214bc83c83..143db908c2c5 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -68,12 +68,13 @@ static struct map_desc s3c2416_iodesc[] __initdata = { IODESC_ENT(TIMER), }; -struct sysdev_class s3c2416_sysclass = { +struct bus_type s3c2416_subsys = { .name = "s3c2416-core", + .dev_name = "s3c2416-core", }; -static struct sys_device s3c2416_sysdev = { - .cls = &s3c2416_sysclass, +static struct device s3c2416_dev = { + .bus = &s3c2416_subsys, }; static void s3c2416_hard_reset(void) @@ -105,7 +106,7 @@ int __init s3c2416_init(void) #endif register_syscore_ops(&s3c24xx_irq_syscore_ops); - return sysdev_register(&s3c2416_sysdev); + return device_register(&s3c2416_dev); } void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) @@ -133,7 +134,7 @@ void __init s3c2416_map_io(void) iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); } -/* need to register class before we actually register the device, and +/* need to register the subsystem before we actually register the device, and * we also need to ensure that it has been initialised before any of the * drivers even try to use it (even if not on an s3c2416 based system) * 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) static int __init s3c2416_core_init(void) { - return sysdev_class_register(&s3c2416_sysclass); + return subsys_system_register(&s3c2416_subsys, NULL); } core_initcall(s3c2416_core_init); -- cgit v1.2.3