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-s5pv210/cpu.c | 15 ++++++++------- arch/arm/mach-s5pv210/pm.c | 10 ++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'arch/arm/mach-s5pv210') diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c index 84ec74633232..28e71efb388e 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/cpu.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -174,17 +174,18 @@ void __init s5pv210_init_irq(void) s5p_init_irq(vic, ARRAY_SIZE(vic)); } -struct sysdev_class s5pv210_sysclass = { - .name = "s5pv210-core", +struct bus_type s5pv210_subsys = { + .name = "s5pv210-core", + .dev_name = "s5pv210-core", }; -static struct sys_device s5pv210_sysdev = { - .cls = &s5pv210_sysclass, +static struct device s5pv210_dev = { + .bus = &s5pv210_subsys, }; static int __init s5pv210_core_init(void) { - return sysdev_class_register(&s5pv210_sysclass); + return subsys_system_register(&s5pv210_subsys, NULL); } core_initcall(s5pv210_core_init); @@ -199,5 +200,5 @@ int __init s5pv210_init(void) /* set sw_reset function */ s5p_reset_hook = s5pv210_sw_reset; - return sysdev_register(&s5pv210_sysdev); + return device_register(&s5pv210_dev); } diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index f149d278377b..677c71c41e50 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c @@ -133,7 +133,7 @@ static void s5pv210_pm_prepare(void) s3c_pm_do_save(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save)); } -static int s5pv210_pm_add(struct sys_device *sysdev) +static int s5pv210_pm_add(struct device *dev) { pm_cpu_prep = s5pv210_pm_prepare; pm_cpu_sleep = s5pv210_cpu_suspend; @@ -141,13 +141,15 @@ static int s5pv210_pm_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s5pv210_pm_driver = { - .add = s5pv210_pm_add, +static struct subsys_interface s5pv210_pm_interface = { + .name = "s5pv210_pm", + .subsys = &s5pv210_subsys, + .add_dev = s5pv210_pm_add, }; static __init int s5pv210_pm_drvinit(void) { - return sysdev_driver_register(&s5pv210_sysclass, &s5pv210_pm_driver); + return subsys_interface_register(&s5pv210_pm_interface); } arch_initcall(s5pv210_pm_drvinit); -- cgit v1.2.3 From edbaa603eb801655e80808a9cf3d3b622e8ac66b Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 21 Dec 2011 16:26:03 -0800 Subject: driver-core: remove sysdev.h usage. The sysdev.h file should not be needed by any in-kernel code, so remove the .h file from these random files that seem to still want to include it. The sysdev code will be going away soon, so this include needs to be removed no matter what. Cc: Jiandong Zheng Cc: Scott Branden Cc: Russell King Cc: Kukjin Kim Cc: David Brown Cc: Daniel Walker Cc: Bryan Huntsman Cc: Ben Dooks Cc: Wan ZongShun Cc: Haavard Skinnemoen Cc: Hans-Christian Egtvedt Cc: Guan Xuetao Cc: "Venkatesh Pallipadi Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Grant Likely Cc: Richard Purdie Cc: Matthew Garrett Signed-off-by: Kay Sievers --- arch/arm/mach-s5pv210/clock.c | 2 +- arch/arm/mach-s5pv210/mach-smdkc110.c | 2 +- arch/arm/mach-s5pv210/mach-smdkv210.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-s5pv210') diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index 4c5ac7a69e9e..6a1e5876bb84 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index f7266bb0cac8..05cf7dc61286 100644 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index a9106c392398..7d4d98916d69 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3