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-s5p64x0/cpu.c | 15 ++++++++------- arch/arm/mach-s5p64x0/pm.c | 10 ++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'arch/arm/mach-s5p64x0') diff --git a/arch/arm/mach-s5p64x0/cpu.c b/arch/arm/mach-s5p64x0/cpu.c index ecab40cf19a..8b029901d91 100644 --- a/arch/arm/mach-s5p64x0/cpu.c +++ b/arch/arm/mach-s5p64x0/cpu.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -190,17 +190,18 @@ void __init s5p6450_init_irq(void) s5p_init_irq(vic, ARRAY_SIZE(vic)); } -struct sysdev_class s5p64x0_sysclass = { - .name = "s5p64x0-core", +struct bus_type s5p64x0_subsys = { + .name = "s5p64x0-core", + .dev_name = "s5p64x0-core", }; -static struct sys_device s5p64x0_sysdev = { - .cls = &s5p64x0_sysclass, +static struct device s5p64x0_subsys = { + .bus = &s5p64x0_subsys, }; static int __init s5p64x0_core_init(void) { - return sysdev_class_register(&s5p64x0_sysclass); + return subsys_system_register(&s5p64x0_subsys, NULL); } core_initcall(s5p64x0_core_init); @@ -211,5 +212,5 @@ int __init s5p64x0_init(void) /* set idle function */ pm_idle = s5p64x0_idle; - return sysdev_register(&s5p64x0_sysdev); + return device_register(&s5p64x0_dev); } diff --git a/arch/arm/mach-s5p64x0/pm.c b/arch/arm/mach-s5p64x0/pm.c index 69927243d25..23f9b22439c 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) } -static int s5p64x0_pm_add(struct sys_device *sysdev) +static int s5p64x0_pm_add(struct device *dev) { pm_cpu_prep = s5p64x0_pm_prepare; pm_cpu_sleep = s5p64x0_cpu_suspend; @@ -169,15 +169,17 @@ static int s5p64x0_pm_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s5p64x0_pm_driver = { - .add = s5p64x0_pm_add, +static struct subsys_interface s5p64x0_pm_interface = { + .name = "s5p64x0_pm", + .subsys = &s5p64x0_subsys, + .add_dev = s5p64x0_pm_add, }; static __init int s5p64x0_pm_drvinit(void) { s3c_pm_init(); - return sysdev_driver_register(&s5p64x0_sysclass, &s5p64x0_pm_driver); + return subsys_interface_register(&s5p64x0_pm_interface); } arch_initcall(s5p64x0_pm_drvinit); -- cgit v1.2.3