diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-12-21 16:01:38 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-21 16:01:38 -0800 |
commit | 4a858cfc9af87cc60b3113c3b7b377a4305eac6a (patch) | |
tree | 22ab8aa44aab760d2e1afcb8559e4debe6092d28 /arch | |
parent | 8f1e938db9230d9f828420adea96f691c722e473 (diff) | |
download | blackbird-op-linux-4a858cfc9af87cc60b3113c3b7b377a4305eac6a.tar.gz blackbird-op-linux-4a858cfc9af87cc60b3113c3b7b377a4305eac6a.zip |
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')
43 files changed, 368 insertions, 293 deletions
diff --git a/arch/arm/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h index d5adaae5ee2c..1953e1b7a53f 100644 --- a/arch/arm/include/asm/mach/time.h +++ b/arch/arm/include/asm/mach/time.h @@ -10,7 +10,7 @@ #ifndef __ASM_ARM_MACH_TIME_H #define __ASM_ARM_MACH_TIME_H -#include <linux/sysdev.h> +#include <linux/device.h> /* * This is our kernel timer structure. diff --git a/arch/arm/mach-exynos/cpu.c b/arch/arm/mach-exynos/cpu.c index 90ec247f3b37..d4c41f349bcc 100644 --- a/arch/arm/mach-exynos/cpu.c +++ b/arch/arm/mach-exynos/cpu.c @@ -9,7 +9,7 @@ */ #include <linux/sched.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <asm/mach/map.h> #include <asm/mach/irq.h> @@ -243,17 +243,18 @@ void __init exynos4_init_irq(void) s5p_init_irq(NULL, 0); } -struct sysdev_class exynos4_sysclass = { - .name = "exynos4-core", +struct bus_type exynos4_subsys = { + .name = "exynos4-core", + .dev_name = "exynos4-core", }; -static struct sys_device exynos4_sysdev = { - .cls = &exynos4_sysclass, +static struct device exynos4_dev = { + .bus = &exynos4_subsys, }; static int __init exynos4_core_init(void) { - return sysdev_class_register(&exynos4_sysclass); + return subsys_system_register(&exynos4_subsys, NULL); } core_initcall(exynos4_core_init); @@ -294,5 +295,5 @@ int __init exynos_init(void) if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) s5p_reset_hook = exynos4_sw_reset; - return sysdev_register(&exynos4_sysdev); + return device_register(&exynos4_dev); } diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 509a435afd4b..c4f792dcad19 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -205,7 +205,7 @@ static void exynos4_pm_prepare(void) } -static int exynos4_pm_add(struct sys_device *sysdev) +static int exynos4_pm_add(struct device *dev) { pm_cpu_prep = exynos4_pm_prepare; pm_cpu_sleep = exynos4_cpu_suspend; @@ -301,8 +301,10 @@ static void exynos4_restore_pll(void) } while (epll_wait || vpll_wait); } -static struct sysdev_driver exynos4_pm_driver = { - .add = exynos4_pm_add, +static struct subsys_interface exynos4_pm_interface = { + .name = "exynos4_pm", + .subsys = &exynos4_subsys, + .add_dev = exynos4_pm_add, }; static __init int exynos4_pm_drvinit(void) @@ -325,7 +327,7 @@ static __init int exynos4_pm_drvinit(void) clk_put(pll_base); } - return sysdev_driver_register(&exynos4_sysclass, &exynos4_pm_driver); + return subsys_interface_register(&exynos4_pm_interface); } arch_initcall(exynos4_pm_drvinit); diff --git a/arch/arm/mach-s3c2410/cpu-freq.c b/arch/arm/mach-s3c2410/cpu-freq.c index 75189df995ae..7dc6c46b5e2b 100644 --- a/arch/arm/mach-s3c2410/cpu-freq.c +++ b/arch/arm/mach-s3c2410/cpu-freq.c @@ -16,7 +16,7 @@ #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/cpufreq.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/clk.h> #include <linux/err.h> #include <linux/io.h> @@ -115,24 +115,25 @@ static struct s3c_cpufreq_info s3c2410_cpufreq_info = { .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), }; -static int s3c2410_cpufreq_add(struct sys_device *sysdev) +static int s3c2410_cpufreq_add(struct device *dev) { return s3c_cpufreq_register(&s3c2410_cpufreq_info); } -static struct sysdev_driver s3c2410_cpufreq_driver = { - .add = s3c2410_cpufreq_add, +static struct subsys_interface s3c2410_cpufreq_interface = { + .name = "s3c2410_cpufreq", + .subsys = &s3c2410_subsys, + .add_dev = s3c2410_cpufreq_add, }; static int __init s3c2410_cpufreq_init(void) { - return sysdev_driver_register(&s3c2410_sysclass, - &s3c2410_cpufreq_driver); + return subsys_interface_register(&s3c2410_cpufreq_interface); } arch_initcall(s3c2410_cpufreq_init); -static int s3c2410a_cpufreq_add(struct sys_device *sysdev) +static int s3c2410a_cpufreq_add(struct device *dev) { /* alter the maximum freq settings for S3C2410A. If a board knows * it only has a maximum of 200, then it should register its own @@ -143,17 +144,18 @@ static int s3c2410a_cpufreq_add(struct sys_device *sysdev) s3c2410_cpufreq_info.max.pclk = 66500000; s3c2410_cpufreq_info.name = "s3c2410a"; - return s3c2410_cpufreq_add(sysdev); + return s3c2410_cpufreq_add(dev); } -static struct sysdev_driver s3c2410a_cpufreq_driver = { - .add = s3c2410a_cpufreq_add, +static struct subsys_interface s3c2410a_cpufreq_interface = { + .name = "s3c2410a_cpufreq", + .subsys = &s3c2410a_subsys, + .add_dev = s3c2410a_cpufreq_add, }; static int __init s3c2410a_cpufreq_init(void) { - return sysdev_driver_register(&s3c2410a_sysclass, - &s3c2410a_cpufreq_driver); + return subsys_interface_register(&s3c2410a_cpufreq_interface); } arch_initcall(s3c2410a_cpufreq_init); diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index dbe43df8cfec..2afd00014a77 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c @@ -14,7 +14,7 @@ #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/serial_core.h> #include <mach/map.h> @@ -132,7 +132,7 @@ static struct s3c24xx_dma_order __initdata s3c2410_dma_order = { }, }; -static int __init s3c2410_dma_add(struct sys_device *sysdev) +static int __init s3c2410_dma_add(struct device *dev) { s3c2410_dma_init(); s3c24xx_dma_order_set(&s3c2410_dma_order); @@ -140,24 +140,28 @@ static int __init s3c2410_dma_add(struct sys_device *sysdev) } #if defined(CONFIG_CPU_S3C2410) -static struct sysdev_driver s3c2410_dma_driver = { - .add = s3c2410_dma_add, +static struct subsys_interface s3c2410_dma_interface = { + .name = "s3c2410_dma", + .subsys = &s3c2410_subsys, + .add_dev = s3c2410_dma_add, }; static int __init s3c2410_dma_drvinit(void) { - return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_dma_driver); + return subsys_interface_register(&s3c2410_interface); } arch_initcall(s3c2410_dma_drvinit); -static struct sysdev_driver s3c2410a_dma_driver = { - .add = s3c2410_dma_add, +static struct subsys_interface s3c2410a_dma_interface = { + .name = "s3c2410a_dma", + .subsys = &s3c2410a_subsys, + .add_dev = s3c2410_dma_add, }; static int __init s3c2410a_dma_drvinit(void) { - return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_dma_driver); + return subsys_interface_register(&s3c2410a_dma_interface); } arch_initcall(s3c2410a_dma_drvinit); @@ -165,13 +169,15 @@ arch_initcall(s3c2410a_dma_drvinit); #if defined(CONFIG_CPU_S3C2442) /* S3C2442 DMA contains the same selection table as the S3C2410 */ -static struct sysdev_driver s3c2442_dma_driver = { - .add = s3c2410_dma_add, +static struct subsys_interface s3c2442_dma_interface = { + .name = "s3c2442_dma", + .subsys = &s3c2442_subsys, + .add_dev = s3c2410_dma_add, }; static int __init s3c2442_dma_drvinit(void) { - return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_dma_driver); + return subsys_interface_register(&s3c2442_dma_interface); } arch_initcall(s3c2442_dma_drvinit); diff --git a/arch/arm/mach-s3c2410/include/mach/dma.h b/arch/arm/mach-s3c2410/include/mach/dma.h index ae8e482b6427..acbdfecd4186 100644 --- a/arch/arm/mach-s3c2410/include/mach/dma.h +++ b/arch/arm/mach-s3c2410/include/mach/dma.h @@ -13,7 +13,7 @@ #ifndef __ASM_ARCH_DMA_H #define __ASM_ARCH_DMA_H __FILE__ -#include <linux/sysdev.h> +#include <linux/device.h> #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ @@ -202,7 +202,7 @@ struct s3c2410_dma_chan { struct s3c2410_dma_buf *end; /* end of queue */ /* system device */ - struct sys_device dev; + struct device dev; }; typedef unsigned long dma_device_t; diff --git a/arch/arm/mach-s3c2410/pll.c b/arch/arm/mach-s3c2410/pll.c index 8338865e11c0..c07438bfc99f 100644 --- a/arch/arm/mach-s3c2410/pll.c +++ b/arch/arm/mach-s3c2410/pll.c @@ -25,7 +25,7 @@ #include <linux/types.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/list.h> #include <linux/clk.h> #include <linux/err.h> @@ -66,30 +66,34 @@ static struct cpufreq_frequency_table pll_vals_12MHz[] = { { .frequency = 270000000, .index = PLLVAL(127, 1, 1), }, }; -static int s3c2410_plls_add(struct sys_device *dev) +static int s3c2410_plls_add(struct device *dev) { return s3c_plltab_register(pll_vals_12MHz, ARRAY_SIZE(pll_vals_12MHz)); } -static struct sysdev_driver s3c2410_plls_drv = { - .add = s3c2410_plls_add, +static struct subsys_interface s3c2410_plls_interface = { + .name = "s3c2410_plls", + .subsys = &s3c2410_subsys, + .add_dev = s3c2410_plls_add, }; static int __init s3c2410_pll_init(void) { - return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_plls_drv); + return subsys_interface_register(&s3c2410_plls_interface); } arch_initcall(s3c2410_pll_init); -static struct sysdev_driver s3c2410a_plls_drv = { - .add = s3c2410_plls_add, +static struct subsys_interface s3c2410a_plls_interface = { + .name = "s3c2410a_plls", + .subsys = &s3c2410a_subsys, + .add_dev = s3c2410_plls_add, }; static int __init s3c2410a_pll_init(void) { - return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_plls_drv); + return subsys_interface_register(&s3c2410a_plls_interface); } arch_initcall(s3c2410a_pll_init); diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c index 4728f9aa7df1..4b948eca73ef 100644 --- a/arch/arm/mach-s3c2410/pm.c +++ b/arch/arm/mach-s3c2410/pm.c @@ -24,7 +24,7 @@ #include <linux/suspend.h> #include <linux/errno.h> #include <linux/time.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/gpio.h> #include <linux/io.h> @@ -111,7 +111,7 @@ struct syscore_ops s3c2410_pm_syscore_ops = { .resume = s3c2410_pm_resume, }; -static int s3c2410_pm_add(struct sys_device *dev) +static int s3c2410_pm_add(struct device *dev) { pm_cpu_prep = s3c2410_pm_prepare; pm_cpu_sleep = s3c2410_cpu_suspend; @@ -120,52 +120,60 @@ static int s3c2410_pm_add(struct sys_device *dev) } #if defined(CONFIG_CPU_S3C2410) -static struct sysdev_driver s3c2410_pm_driver = { - .add = s3c2410_pm_add, +static struct subsys_interface s3c2410_pm_interface = { + .name = "s3c2410_pm", + .subsys = &s3c2410_subsys, + .add_dev = s3c2410_pm_add, }; /* register ourselves */ static int __init s3c2410_pm_drvinit(void) { - return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_pm_driver); + return subsys_interface_register(&s3c2410_pm_interface); } arch_initcall(s3c2410_pm_drvinit); -static struct sysdev_driver s3c2410a_pm_driver = { - .add = s3c2410_pm_add, +static struct subsys_interface s3c2410a_pm_interface = { + .name = "s3c2410a_pm", + subsys = &s3c2410a_subsys, + .add_dev = s3c2410_pm_add, }; static int __init s3c2410a_pm_drvinit(void) { - return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_pm_driver); + return subsys_interface_register(&s3c2410a_pm_interface); } arch_initcall(s3c2410a_pm_drvinit); #endif #if defined(CONFIG_CPU_S3C2440) -static struct sysdev_driver s3c2440_pm_driver = { - .add = s3c2410_pm_add, +static struct subsys_interface s3c2440_pm_interface = { + .name = "s3c2440_pm", + .subsys = &s3c2440_subsys, + .add_dev = s3c2410_pm_add, }; static int __init s3c2440_pm_drvinit(void) { - return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_pm_driver); + return subsys_interface_register(&s3c2440_pm_interface); } arch_initcall(s3c2440_pm_drvinit); #endif #if defined(CONFIG_CPU_S3C2442) -static struct sysdev_driver s3c2442_pm_driver = { - .add = s3c2410_pm_add, +static struct subsys_interface s3c2442_pm_interface = { + .name = "s3c2442_pm", + .subsys = &s3c2442_subsys, + .add_dev = s3c2410_pm_add, }; static int __init s3c2442_pm_drvinit(void) { - return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_pm_driver); + return subsys_interface_register(&s3c2442_pm_interface); } arch_initcall(s3c2442_pm_drvinit); diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index 3d7ebc557a72..da6651556eb9 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c @@ -18,7 +18,7 @@ #include <linux/init.h> #include <linux/gpio.h> #include <linux/clk.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/serial_core.h> #include <linux/platform_device.h> @@ -131,22 +131,24 @@ void __init s3c2410_init_clocks(int xtal) s3c24xx_register_clock(&s3c2410_armclk); } -struct sysdev_class s3c2410_sysclass = { +struct bus_type s3c2410_subsys = { .name = "s3c2410-core", + .dev_name = "s3c2410-core", }; /* Note, we would have liked to name this s3c2410-core, but we cannot - * register two sysdev_class with the same name. + * register two subsystems with the same name. */ -struct sysdev_class s3c2410a_sysclass = { +struct bus_type s3c2410a_subsys = { .name = "s3c2410a-core", + .dev_name = "s3c2410a-core", }; -static struct sys_device s3c2410_sysdev = { - .cls = &s3c2410_sysclass, +static struct device s3c2410_dev = { + .bus = &s3c2410_subsys, }; -/* 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 s3c2410 based system) * as a driver which may support both 2410 and 2440 may try and use it. @@ -154,14 +156,14 @@ static struct sys_device s3c2410_sysdev = { static int __init s3c2410_core_init(void) { - return sysdev_class_register(&s3c2410_sysclass); + return subsys_system_register(&s3c2410_subsys, NULL); } core_initcall(s3c2410_core_init); static int __init s3c2410a_core_init(void) { - return sysdev_class_register(&s3c2410a_sysclass); + return subsys_system_register(&s3c2410a_subsys, NULL); } core_initcall(s3c2410a_core_init); @@ -175,11 +177,11 @@ int __init s3c2410_init(void) #endif register_syscore_ops(&s3c24xx_irq_syscore_ops); - return sysdev_register(&s3c2410_sysdev); + return device_register(&s3c2410_dev); } int __init s3c2410a_init(void) { - s3c2410_sysdev.cls = &s3c2410a_sysclass; + s3c2410_dev.bus = &s3c2410a_subsys; return s3c2410_init(); } diff --git a/arch/arm/mach-s3c2412/cpu-freq.c b/arch/arm/mach-s3c2412/cpu-freq.c index eb3ea1721335..d8664b7652ce 100644 --- a/arch/arm/mach-s3c2412/cpu-freq.c +++ b/arch/arm/mach-s3c2412/cpu-freq.c @@ -16,7 +16,7 @@ #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/cpufreq.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/delay.h> #include <linux/clk.h> #include <linux/err.h> @@ -194,7 +194,7 @@ static struct s3c_cpufreq_info s3c2412_cpufreq_info = { .debug_io_show = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs), }; -static int s3c2412_cpufreq_add(struct sys_device *sysdev) +static int s3c2412_cpufreq_add(struct device *dev) { unsigned long fclk_rate; @@ -244,14 +244,15 @@ err_fclk: return -ENOENT; } -static struct sysdev_driver s3c2412_cpufreq_driver = { - .add = s3c2412_cpufreq_add, +static struct subsys_interface s3c2412_cpufreq_interface = { + .name = "s3c2412_cpufreq", + .subsys = &s3c2412_subsys, + .add_dev = s3c2412_cpufreq_add, }; static int s3c2412_cpufreq_init(void) { - return sysdev_driver_register(&s3c2412_sysclass, - &s3c2412_cpufreq_driver); + return subsys_interface_register(&s3c2412_cpufreq_interface); } arch_initcall(s3c2412_cpufreq_init); diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c index d2a7d5ef3e67..142acd3b5e15 100644 --- a/arch/arm/mach-s3c2412/dma.c +++ b/arch/arm/mach-s3c2412/dma.c @@ -14,7 +14,7 @@ #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/serial_core.h> #include <linux/io.h> @@ -159,19 +159,21 @@ static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = { .map_size = ARRAY_SIZE(s3c2412_dma_mappings), }; -static int __init s3c2412_dma_add(struct sys_device *sysdev) +static int __init s3c2412_dma_add(struct device *dev) { s3c2410_dma_init(); return s3c24xx_dma_init_map(&s3c2412_dma_sel); } -static struct sysdev_driver s3c2412_dma_driver = { - .add = s3c2412_dma_add, +static struct subsys_interface s3c2412_dma_interface = { + .name = "s3c2412_dma", + .subsys = &s3c2412_subsys, + .add_dev = s3c2412_dma_add, }; static int __init s3c2412_dma_init(void) { - return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_dma_driver); + return subsys_interface_register(&s3c2412_dma_interface); } arch_initcall(s3c2412_dma_init); diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c index 1a1aa220972b..a8a46c1644f4 100644 --- a/arch/arm/mach-s3c2412/irq.c +++ b/arch/arm/mach-s3c2412/irq.c @@ -23,7 +23,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/ioport.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/io.h> #include <mach/hardware.h> @@ -170,7 +170,7 @@ static int s3c2412_irq_rtc_wake(struct irq_data *data, unsigned int state) static struct irq_chip s3c2412_irq_rtc_chip; -static int s3c2412_irq_add(struct sys_device *sysdev) +static int s3c2412_irq_add(struct device *dev) { unsigned int irqno; @@ -200,13 +200,15 @@ static int s3c2412_irq_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2412_irq_driver = { - .add = s3c2412_irq_add, +static struct subsys_interface s3c2412_irq_interface = { + .name = "s3c2412_irq", + .subsys = &s3c2412_subsys, + .add_dev = s3c2412_irq_add, }; static int s3c2412_irq_init(void) { - return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_irq_driver); + return subsys_interface_register(&s3c2412_irq_interface); } arch_initcall(s3c2412_irq_init); diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c index f4077efa51fa..fd7210d74db9 100644 --- a/arch/arm/mach-s3c2412/pm.c +++ b/arch/arm/mach-s3c2412/pm.c @@ -16,7 +16,7 @@ #include <linux/list.h> #include <linux/timer.h> #include <linux/init.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/platform_device.h> #include <linux/io.h> @@ -56,7 +56,7 @@ static void s3c2412_pm_prepare(void) { } -static int s3c2412_pm_add(struct sys_device *sysdev) +static int s3c2412_pm_add(struct device *dev) { pm_cpu_prep = s3c2412_pm_prepare; pm_cpu_sleep = s3c2412_cpu_suspend; @@ -87,13 +87,15 @@ static struct sleep_save s3c2412_sleep[] = { SAVE_ITEM(S3C2413_GPJSLPCON), }; -static struct sysdev_driver s3c2412_pm_driver = { - .add = s3c2412_pm_add, +static struct subsys_interface s3c2412_pm_interface = { + .name = "s3c2412_pm", + .subsys = &s3c2412_subsys, + .add_dev = s3c2412_pm_add, }; static __init int s3c2412_pm_init(void) { - return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_pm_driver); + return subsys_interface_register_register(&s3c2412_pm_interface); } arch_initcall(s3c2412_pm_init); diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c index 57a1e01e4e50..6c7253ffc5bc 100644 --- a/arch/arm/mach-s3c2412/s3c2412.c +++ b/arch/arm/mach-s3c2412/s3c2412.c @@ -18,7 +18,7 @@ #include <linux/init.h> #include <linux/clk.h> #include <linux/delay.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/serial_core.h> #include <linux/platform_device.h> @@ -220,25 +220,26 @@ void __init s3c2412_init_clocks(int xtal) s3c2412_baseclk_add(); } -/* 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 s3c2412 based system) * as a driver which may support both 2410 and 2440 may try and use it. */ -struct sysdev_class s3c2412_sysclass = { +struct bus_type s3c2412_subsys = { .name = "s3c2412-core", + .dev_name = "s3c2412-core", }; static int __init s3c2412_core_init(void) { - return sysdev_class_register(&s3c2412_sysclass); + return subsys_system_register(&s3c2412_subsys, NULL); } core_initcall(s3c2412_core_init); -static struct sys_device s3c2412_sysdev = { - .cls = &s3c2412_sysclass, +static struct device s3c2412_dev = { + .bus = &s3c2412_subsys, }; int __init s3c2412_init(void) @@ -250,5 +251,5 @@ int __init s3c2412_init(void) #endif register_syscore_ops(&s3c24xx_irq_syscore_ops); - return sysdev_register(&s3c2412_sysdev); + return device_register(&s3c2412_dev); } 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 <linux/module.h> #include <linux/interrupt.h> #include <linux/ioport.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/io.h> #include <mach/hardware.h> @@ -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 <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/io.h> @@ -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 <linux/gpio.h> #include <linux/platform_device.h> #include <linux/serial_core.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/clk.h> #include <linux/io.h> @@ -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); diff --git a/arch/arm/mach-s3c2440/clock.c b/arch/arm/mach-s3c2440/clock.c index f9e6bdaf41d2..d8957592fdc4 100644 --- a/arch/arm/mach-s3c2440/clock.c +++ b/arch/arm/mach-s3c2440/clock.c @@ -28,7 +28,6 @@ #include <linux/errno.h> #include <linux/err.h> #include <linux/device.h> -#include <linux/sysdev.h> #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/mutex.h> @@ -108,7 +107,7 @@ static struct clk s3c2440_clk_ac97 = { .ctrlbit = S3C2440_CLKCON_CAMERA, }; -static int s3c2440_clk_add(struct sys_device *sysdev) +static int s3c2440_clk_add(struct device *dev) { struct clk *clock_upll; struct clk *clock_h; @@ -137,13 +136,15 @@ static int s3c2440_clk_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2440_clk_driver = { - .add = s3c2440_clk_add, +static struct subsys_interface s3c2440_clk_interface = { + .name = "s3c2440_clk", + .subsys = &s3c2440_subsys, + .add_dev = s3c2440_clk_add, }; -static __init int s3c24xx_clk_driver(void) +static __init int s3c24xx_clk_init(void) { - return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver); + return subsys_interface_register(&s3c2440_clk_interface); } -arch_initcall(s3c24xx_clk_driver); +arch_initcall(s3c24xx_clk_init); diff --git a/arch/arm/mach-s3c2440/dma.c b/arch/arm/mach-s3c2440/dma.c index 0e73f8f9d132..15b1ddf8f626 100644 --- a/arch/arm/mach-s3c2440/dma.c +++ b/arch/arm/mach-s3c2440/dma.c @@ -14,7 +14,7 @@ #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/serial_core.h> #include <mach/map.h> @@ -174,20 +174,22 @@ static struct s3c24xx_dma_order __initdata s3c2440_dma_order = { }, }; -static int __init s3c2440_dma_add(struct sys_device *sysdev) +static int __init s3c2440_dma_add(struct device *dev) { s3c2410_dma_init(); s3c24xx_dma_order_set(&s3c2440_dma_order); return s3c24xx_dma_init_map(&s3c2440_dma_sel); } -static struct sysdev_driver s3c2440_dma_driver = { - .add = s3c2440_dma_add, +static struct subsys_interface s3c2440_dma_interface = { + .name = "s3c2440_dma", + .subsys = &s3c2440_subsys, + .add_dev = s3c2440_dma_add, }; static int __init s3c2440_dma_init(void) { - return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_dma_driver); + return subsys_interface_register(&s3c2440_dma_interface); } arch_initcall(s3c2440_dma_init); diff --git a/arch/arm/mach-s3c2440/irq.c b/arch/arm/mach-s3c2440/irq.c index eb1cc0f0705e..4fee9bc6bcb5 100644 --- a/arch/arm/mach-s3c2440/irq.c +++ b/arch/arm/mach-s3c2440/irq.c @@ -23,7 +23,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/ioport.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/io.h> #include <mach/hardware.h> @@ -92,7 +92,7 @@ static struct irq_chip s3c_irq_wdtac97 = { .irq_ack = s3c_irq_wdtac97_ack, }; -static int s3c2440_irq_add(struct sys_device *sysdev) +static int s3c2440_irq_add(struct device *dev) { unsigned int irqno; @@ -113,13 +113,15 @@ static int s3c2440_irq_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2440_irq_driver = { - .add = s3c2440_irq_add, +static struct subsys_interface s3c2440_irq_interface = { + .name = "s3c2440_irq", + .subsys = &s3c2440_subsys, + .add_dev = s3c2440_irq_add, }; static int s3c2440_irq_init(void) { - return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); + return subsys_interface_register(&s3c2440_irq_interface); } arch_initcall(s3c2440_irq_init); diff --git a/arch/arm/mach-s3c2440/s3c2440-cpufreq.c b/arch/arm/mach-s3c2440/s3c2440-cpufreq.c index 976002fb1b8f..cf7596694efe 100644 --- a/arch/arm/mach-s3c2440/s3c2440-cpufreq.c +++ b/arch/arm/mach-s3c2440/s3c2440-cpufreq.c @@ -17,7 +17,7 @@ #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/cpufreq.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/delay.h> #include <linux/clk.h> #include <linux/err.h> @@ -270,7 +270,7 @@ struct s3c_cpufreq_info s3c2440_cpufreq_info = { .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), }; -static int s3c2440_cpufreq_add(struct sys_device *sysdev) +static int s3c2440_cpufreq_add(struct device *dev) { xtal = s3c_cpufreq_clk_get(NULL, "xtal"); hclk = s3c_cpufreq_clk_get(NULL, "hclk"); @@ -285,27 +285,29 @@ static int s3c2440_cpufreq_add(struct sys_device *sysdev) return s3c_cpufreq_register(&s3c2440_cpufreq_info); } -static struct sysdev_driver s3c2440_cpufreq_driver = { - .add = s3c2440_cpufreq_add, +static struct subsys_interface s3c2440_cpufreq_interface = { + .name = "s3c2440_cpufreq", + .subsys = &s3c2440_subsys, + .add_dev = s3c2440_cpufreq_add, }; static int s3c2440_cpufreq_init(void) { - return sysdev_driver_register(&s3c2440_sysclass, - &s3c2440_cpufreq_driver); + return subsys_interface_register(&s3c2440_cpufreq_interface); } /* arch_initcall adds the clocks we need, so use subsys_initcall. */ subsys_initcall(s3c2440_cpufreq_init); -static struct sysdev_driver s3c2442_cpufreq_driver = { - .add = s3c2440_cpufreq_add, +static struct subsys_interface s3c2442_cpufreq_interface = { + .name = "s3c2442_cpufreq", + .subsys = &s3c2442_subsys, + .add_dev = s3c2440_cpufreq_add, }; static int s3c2442_cpufreq_init(void) { - return sysdev_driver_register(&s3c2442_sysclass, - &s3c2442_cpufreq_driver); + return subsys_interface_register(&s3c2442_cpufreq_interface); } subsys_initcall(s3c2442_cpufreq_init); diff --git a/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c b/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c index f105d5e8c477..b5368ae8d7fe 100644 --- a/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c +++ b/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c @@ -14,7 +14,7 @@ #include <linux/types.h> #include <linux/kernel.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/clk.h> #include <linux/err.h> @@ -51,7 +51,7 @@ static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = { { .frequency = 400000000, .index = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */ }; -static int s3c2440_plls12_add(struct sys_device *dev) +static int s3c2440_plls12_add(struct device *dev) { struct clk *xtal_clk; unsigned long xtal; @@ -72,25 +72,29 @@ static int s3c2440_plls12_add(struct sys_device *dev) return 0; } -static struct sysdev_driver s3c2440_plls12_drv = { - .add = s3c2440_plls12_add, +static struct subsys_interface s3c2440_plls12_interface = { + .name = "s3c2440_plls12", + .subsys = &s3c2440_subsys, + .add_dev = s3c2440_plls12_add, }; static int __init s3c2440_pll_12mhz(void) { - return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_plls12_drv); + return subsys_interface_register(&s3c2440_plls12_interface); } arch_initcall(s3c2440_pll_12mhz); -static struct sysdev_driver s3c2442_plls12_drv = { - .add = s3c2440_plls12_add, +static struct subsys_interface s3c2442_plls12_interface = { + .name = "s3c2442_plls12", + .subsys = &s3c2442_subsys, + .add_dev = s3c2440_plls12_add, }; static int __init s3c2442_pll_12mhz(void) { - return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_plls12_drv); + return subsys_interface_register(&s3c2442_plls12_interface); } diff --git a/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c b/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c index c8a8f90ef382..42f2b5cd2399 100644 --- a/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c +++ b/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c @@ -14,7 +14,7 @@ #include <linux/types.h> #include <linux/kernel.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/clk.h> #include <linux/err.h> @@ -79,7 +79,7 @@ static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = { { .frequency = 402192000, .index = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */ }; -static int s3c2440_plls169344_add(struct sys_device *dev) +static int s3c2440_plls169344_add(struct device *dev) { struct clk *xtal_clk; unsigned long xtal; @@ -100,28 +100,28 @@ static int s3c2440_plls169344_add(struct sys_device *dev) return 0; } -static struct sysdev_driver s3c2440_plls169344_drv = { - .add = s3c2440_plls169344_add, +static struct subsys_interface s3c2440_plls169344_interface = { + .name = "s3c2440_plls169344", + .subsys = &s3c2440_subsys, + .add_dev = s3c2440_plls169344_add, }; static int __init s3c2440_pll_16934400(void) { - return sysdev_driver_register(&s3c2440_sysclass, - &s3c2440_plls169344_drv); - + return subsys_interface_register(&s3c2440_plls169344_interface); } arch_initcall(s3c2440_pll_16934400); -static struct sysdev_driver s3c2442_plls169344_drv = { - .add = s3c2440_plls169344_add, +static struct subsys_interface s3c2442_plls169344_interface = { + .name = "s3c2442_plls169344", + .subsys = &s3c2442_subsys, + .add_dev = s3c2440_plls169344_add, }; static int __init s3c2442_pll_16934400(void) { - return sysdev_driver_register(&s3c2442_sysclass, - &s3c2442_plls169344_drv); - + return subsys_interface_register(&s3c2442_plls169344_interface); } arch_initcall(s3c2442_pll_16934400); diff --git a/arch/arm/mach-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c index 37f8cc6aabd4..2b3dddb49af7 100644 --- a/arch/arm/mach-s3c2440/s3c2440.c +++ b/arch/arm/mach-s3c2440/s3c2440.c @@ -18,7 +18,7 @@ #include <linux/init.h> #include <linux/platform_device.h> #include <linux/serial_core.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/gpio.h> #include <linux/clk.h> @@ -40,8 +40,8 @@ #include <plat/gpio-cfg.h> #include <plat/gpio-cfg-helpers.h> -static struct sys_device s3c2440_sysdev = { - .cls = &s3c2440_sysclass, +static struct device s3c2440_dev = { + .bus = &s3c2440_subsys, }; int __init s3c2440_init(void) @@ -63,7 +63,7 @@ int __init s3c2440_init(void) /* register our system device for everything else */ - return sysdev_register(&s3c2440_sysdev); + return device_register(&s3c2440_dev); } void __init s3c2440_map_io(void) diff --git a/arch/arm/mach-s3c2440/s3c2442.c b/arch/arm/mach-s3c2440/s3c2442.c index 2c822e09392f..9ab15cdea706 100644 --- a/arch/arm/mach-s3c2440/s3c2442.c +++ b/arch/arm/mach-s3c2440/s3c2442.c @@ -28,7 +28,6 @@ #include <linux/errno.h> #include <linux/err.h> #include <linux/device.h> -#include <linux/sysdev.h> #include <linux/syscore_ops.h> #include <linux/interrupt.h> #include <linux/ioport.h> @@ -123,7 +122,7 @@ static struct clk s3c2442_clk_cam_upll = { }, }; -static int s3c2442_clk_add(struct sys_device *sysdev) +static int s3c2442_clk_add(struct device *dev) { struct clk *clock_upll; struct clk *clock_h; @@ -149,20 +148,22 @@ static int s3c2442_clk_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2442_clk_driver = { - .add = s3c2442_clk_add, +static struct subsys_interface s3c2442_clk_interface = { + .name = "s3c2442_clk", + .subsys = &s3c2442_subsys, + .add_dev s3c2442_clk_add, }; static __init int s3c2442_clk_init(void) { - return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_clk_driver); + return subsys_interface_register(&s3c2442_clk_interface); } arch_initcall(s3c2442_clk_init); -static struct sys_device s3c2442_sysdev = { - .cls = &s3c2442_sysclass, +static struct device s3c2442_dev = { + .bus = &s3c2442_subsys, }; int __init s3c2442_init(void) @@ -175,7 +176,7 @@ int __init s3c2442_init(void) register_syscore_ops(&s3c244x_pm_syscore_ops); register_syscore_ops(&s3c24xx_irq_syscore_ops); - return sysdev_register(&s3c2442_sysdev); + return device_register(&s3c2442_dev); } void __init s3c2442_map_io(void) diff --git a/arch/arm/mach-s3c2440/s3c244x-clock.c b/arch/arm/mach-s3c2440/s3c244x-clock.c index 7f5ea0a169a5..b3fdbdda3d5f 100644 --- a/arch/arm/mach-s3c2440/s3c244x-clock.c +++ b/arch/arm/mach-s3c2440/s3c244x-clock.c @@ -28,7 +28,6 @@ #include <linux/errno.h> #include <linux/err.h> #include <linux/device.h> -#include <linux/sysdev.h> #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/clk.h> @@ -73,7 +72,7 @@ static struct clk clk_arm = { }, }; -static int s3c244x_clk_add(struct sys_device *sysdev) +static int s3c244x_clk_add(struct device *dev) { unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); unsigned long clkdivn; @@ -115,24 +114,28 @@ static int s3c244x_clk_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2440_clk_driver = { - .add = s3c244x_clk_add, +static struct subsys_interface s3c2440_clk_interface = { + .name = "s3c2440_clk", + .subsys = &s3c2440_subsys, + .add_dev = s3c244x_clk_add, }; static int s3c2440_clk_init(void) { - return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver); + return subsys_interface_register(&s3c2440_clk_interface); } arch_initcall(s3c2440_clk_init); -static struct sysdev_driver s3c2442_clk_driver = { - .add = s3c244x_clk_add, +static struct subsys_interface s3c2442_clk_interface = { + .name = "s3c2442_clk", + .subsys = &s3c2442_subsys, + .add_dev = s3c244x_clk_add, }; static int s3c2442_clk_init(void) { - return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_clk_driver); + return subsys_interface_register(&s3c2442_clk_interface); } arch_initcall(s3c2442_clk_init); diff --git a/arch/arm/mach-s3c2440/s3c244x-irq.c b/arch/arm/mach-s3c2440/s3c244x-irq.c index c63e8f26d901..74d3dcf46a48 100644 --- a/arch/arm/mach-s3c2440/s3c244x-irq.c +++ b/arch/arm/mach-s3c2440/s3c244x-irq.c @@ -23,7 +23,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/ioport.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/io.h> #include <mach/hardware.h> @@ -91,7 +91,7 @@ static struct irq_chip s3c_irq_cam = { .irq_ack = s3c_irq_cam_ack, }; -static int s3c244x_irq_add(struct sys_device *sysdev) +static int s3c244x_irq_add(struct device *dev) { unsigned int irqno; @@ -114,25 +114,29 @@ static int s3c244x_irq_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2440_irq_driver = { - .add = s3c244x_irq_add, +static struct subsys_interface s3c2440_irq_interface = { + .name = "s3c2440_irq", + .subsys = &s3c2440_subsys, + .add_dev = s3c244x_irq_add, }; static int s3c2440_irq_init(void) { - return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); + return subsys_interface_register(&s3c2440_irq_interface); } arch_initcall(s3c2440_irq_init); -static struct sysdev_driver s3c2442_irq_driver = { - .add = s3c244x_irq_add, +static struct subsys_interface s3c2442_irq_interface = { + .name = "s3c2442_irq", + .subsys = &s3c2442_subsys, + .add_dev = s3c244x_irq_add, }; static int s3c2442_irq_init(void) { - return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver); + return subsys_interface_register(&s3c2442_irq_interface); } arch_initcall(s3c2442_irq_init); diff --git a/arch/arm/mach-s3c2440/s3c244x.c b/arch/arm/mach-s3c2440/s3c244x.c index 7e8a23d2098a..36bc60f61d0a 100644 --- a/arch/arm/mach-s3c2440/s3c244x.c +++ b/arch/arm/mach-s3c2440/s3c244x.c @@ -18,7 +18,7 @@ #include <linux/init.h> #include <linux/serial_core.h> #include <linux/platform_device.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/clk.h> #include <linux/io.h> @@ -135,17 +135,19 @@ void __init s3c244x_init_clocks(int xtal) s3c2410_baseclk_add(); } -/* Since the S3C2442 and S3C2440 share items, put both sysclasses here */ +/* Since the S3C2442 and S3C2440 share items, put both subsystems here */ -struct sysdev_class s3c2440_sysclass = { +struct bus_type s3c2440_subsys = { .name = "s3c2440-core", + .dev_name = "s3c2440-core", }; -struct sysdev_class s3c2442_sysclass = { +struct bus_type s3c2442_subsys = { .name = "s3c2442-core", + .dev_name = "s3c2442-core", }; -/* 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 s3c2440 based system) * as a driver which may support both 2410 and 2440 may try and use it. @@ -153,14 +155,14 @@ struct sysdev_class s3c2442_sysclass = { static int __init s3c2440_core_init(void) { - return sysdev_class_register(&s3c2440_sysclass); + return subsys_system_register(&s3c2440_subsys, NULL); } core_initcall(s3c2440_core_init); static int __init s3c2442_core_init(void) { - return sysdev_class_register(&s3c2442_sysclass); + return subsys_system_register(&s3c2442_subsys, NULL); } core_initcall(s3c2442_core_init); 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 @@ #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/serial_core.h> #include <linux/io.h> @@ -135,19 +135,21 @@ static struct s3c24xx_dma_selection __initdata s3c2443_dma_sel = { .map_size = ARRAY_SIZE(s3c2443_dma_mappings), }; -static int __init s3c2443_dma_add(struct sys_device *sysdev) +static int __init s3c2443_dma_add(struct device *dev) { s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100); return s3c24xx_dma_init_map(&s3c2443_dma_sel); } -static struct sysdev_driver s3c2443_dma_driver = { - .add = s3c2443_dma_add, +static struct subsys_interface s3c2443_dma_interface = { + .name = "s3c2443_dma", + .subsys = &s3c2443_subsys, + .add_dev = s3c2443_dma_add, }; static int __init s3c2443_dma_init(void) { - return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_dma_driver); + return subsys_interface_register(&s3c2443_dma_interface); } arch_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 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/ioport.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/io.h> #include <mach/hardware.h> @@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base, return 0; } -static int __init s3c2443_irq_add(struct sys_device *sysdev) +static int __init s3c2443_irq_add(struct device *dev) { printk("S3C2443: IRQ Support\n"); @@ -265,13 +265,15 @@ static int __init s3c2443_irq_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2443_irq_driver = { - .add = s3c2443_irq_add, +static struct subsys_interface s3c2443_irq_interface = { + .name = "s3c2443_irq", + .subsys = &s3c2443_subsys, + .add_dev = s3c2443_irq_add, }; static int __init s3c2443_irq_init(void) { - return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_irq_driver); + return subsys_interface_register(&s3c2443_irq_interface); } arch_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 @@ #include <linux/gpio.h> #include <linux/platform_device.h> #include <linux/serial_core.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/clk.h> #include <linux/io.h> @@ -49,12 +49,13 @@ static struct map_desc s3c2443_iodesc[] __initdata = { IODESC_ENT(TIMER), }; -struct sysdev_class s3c2443_sysclass = { +struct bus_type s3c2443_subsys = { .name = "s3c2443-core", + .dev_name = "s3c2443-core", }; -static struct sys_device s3c2443_sysdev = { - .cls = &s3c2443_sysclass, +static struct device s3c2443_dev = { + .bus = &s3c2443_subsys, }; static void s3c2443_hard_reset(void) @@ -77,7 +78,7 @@ int __init s3c2443_init(void) s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT; s3c_device_wdt.resource[1].end = IRQ_S3C2443_WDT; - return sysdev_register(&s3c2443_sysdev); + return device_register(&s3c2443_dev); } void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no) @@ -99,7 +100,7 @@ void __init s3c2443_map_io(void) iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_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 s3c2443 based system) * 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) static int __init s3c2443_core_init(void) { - return sysdev_class_register(&s3c2443_sysclass); + return subsys_system_register(&s3c2443_subsys, NULL); } core_initcall(s3c2443_core_init); diff --git a/arch/arm/mach-s3c64xx/cpu.c b/arch/arm/mach-s3c64xx/cpu.c index de085b798aa4..0f8a669dc7fc 100644 --- a/arch/arm/mach-s3c64xx/cpu.c +++ b/arch/arm/mach-s3c64xx/cpu.c @@ -16,7 +16,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/ioport.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/serial_core.h> #include <linux/platform_device.h> #include <linux/io.h> @@ -122,12 +122,13 @@ static struct map_desc s3c_iodesc[] __initdata = { }; -struct sysdev_class s3c64xx_sysclass = { - .name = "s3c64xx-core", +struct bus_type s3c64xx_subsys = { + .name = "s3c64xx-core", + .dev_name = "s3c64xx-core", }; -static struct sys_device s3c64xx_sysdev = { - .cls = &s3c64xx_sysclass, +static struct device s3c64xx_dev = { + .bus = &s3c64xx_subsys, }; /* uart registration process */ @@ -152,10 +153,10 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); } -static __init int s3c64xx_sysdev_init(void) +static __init int s3c64xx_dev_init(void) { - sysdev_class_register(&s3c64xx_sysclass); - return sysdev_register(&s3c64xx_sysdev); + subsys_system_register(&s3c64xx_subsys, NULL); + return device_register(&s3c64xx_dev); } -core_initcall(s3c64xx_sysdev_init); +core_initcall(s3c64xx_dev_init); diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index 17d62f4f8204..f2a7a1725596 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c @@ -16,7 +16,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/dmapool.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/errno.h> #include <linux/slab.h> #include <linux/delay.h> @@ -35,7 +35,7 @@ /* dma channel state information */ struct s3c64xx_dmac { - struct sys_device sysdev; + struct device dev; struct clk *clk; void __iomem *regs; struct s3c2410_dma_chan *channels; @@ -631,8 +631,9 @@ static irqreturn_t s3c64xx_dma_irq(int irq, void *pw) return IRQ_HANDLED; } -static struct sysdev_class dma_sysclass = { +static struct bus_type dma_subsys = { .name = "s3c64xx-dma", + .dev_name = "s3c64xx-dma", }; static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, @@ -651,12 +652,12 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, return -ENOMEM; } - dmac->sysdev.id = chno / 8; - dmac->sysdev.cls = &dma_sysclass; + dmac->dev.id = chno / 8; + dmac->dev.bus = &dma_subsys; - err = sysdev_register(&dmac->sysdev); + err = device_register(&dmac->dev); if (err) { - printk(KERN_ERR "%s: failed to register sysdevice\n", __func__); + printk(KERN_ERR "%s: failed to register device\n", __func__); goto err_alloc; } @@ -667,7 +668,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, goto err_dev; } - snprintf(clkname, sizeof(clkname), "dma%d", dmac->sysdev.id); + snprintf(clkname, sizeof(clkname), "dma%d", dmac->dev.id); dmac->clk = clk_get(NULL, clkname); if (IS_ERR(dmac->clk)) { @@ -715,7 +716,7 @@ err_clk: err_map: iounmap(regs); err_dev: - sysdev_unregister(&dmac->sysdev); + device_unregister(&dmac->dev); err_alloc: kfree(dmac); return err; @@ -733,9 +734,9 @@ static int __init s3c64xx_dma_init(void) return -ENOMEM; } - ret = sysdev_class_register(&dma_sysclass); + ret = subsys_system_register(&dma_subsys, NULL); if (ret) { - printk(KERN_ERR "%s: failed to create sysclass\n", __func__); + printk(KERN_ERR "%s: failed to create subsys\n", __func__); return -ENOMEM; } diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c index 7a3bc32df425..691a7ca78c1e 100644 --- a/arch/arm/mach-s3c64xx/s3c6400.c +++ b/arch/arm/mach-s3c64xx/s3c6400.c @@ -17,7 +17,7 @@ #include <linux/init.h> #include <linux/clk.h> #include <linux/io.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/serial_core.h> #include <linux/platform_device.h> @@ -70,17 +70,18 @@ void __init s3c6400_init_irq(void) s3c64xx_init_irq(~0 & ~(0xf << 5), ~0); } -struct sysdev_class s3c6400_sysclass = { - .name = "s3c6400-core", +static struct bus_type s3c6400_subsys = { + .name = "s3c6400-core", + .dev_name = "s3c6400-core", }; -static struct sys_device s3c6400_sysdev = { - .cls = &s3c6400_sysclass, +static struct device s3c6400_dev = { + .bus = &s3c6400_subsys, }; static int __init s3c6400_core_init(void) { - return sysdev_class_register(&s3c6400_sysclass); + return subsys_system_register(&s3c6400_subsys, NULL); } core_initcall(s3c6400_core_init); @@ -89,5 +90,5 @@ int __init s3c6400_init(void) { printk("S3C6400: Initialising architecture\n"); - return sysdev_register(&s3c6400_sysdev); + return device_register(&s3c6400_dev); } diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c index 4117003464ad..9a5484ad4308 100644 --- a/arch/arm/mach-s3c64xx/s3c6410.c +++ b/arch/arm/mach-s3c64xx/s3c6410.c @@ -18,7 +18,7 @@ #include <linux/init.h> #include <linux/clk.h> #include <linux/io.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/serial_core.h> #include <linux/platform_device.h> @@ -75,17 +75,18 @@ void __init s3c6410_init_irq(void) s3c64xx_init_irq(~0 & ~(1 << 7), ~0); } -struct sysdev_class s3c6410_sysclass = { - .name = "s3c6410-core", +struct bus_type s3c6410_subsys = { + .name = "s3c6410-core", + .dev_name = "s3c6410-core", }; -static struct sys_device s3c6410_sysdev = { - .cls = &s3c6410_sysclass, +static struct device s3c6410_dev = { + .bus = &s3c6410_subsys, }; static int __init s3c6410_core_init(void) { - return sysdev_class_register(&s3c6410_sysclass); + return subsys_system_register(&s3c6410_subsys, NULL); } core_initcall(s3c6410_core_init); @@ -94,5 +95,5 @@ int __init s3c6410_init(void) { printk("S3C6410: Initialising architecture\n"); - return sysdev_register(&s3c6410_sysdev); + return device_register(&s3c6410_dev); } diff --git a/arch/arm/mach-s5p64x0/cpu.c b/arch/arm/mach-s5p64x0/cpu.c index ecab40cf19ab..8b029901d919 100644 --- a/arch/arm/mach-s5p64x0/cpu.c +++ b/arch/arm/mach-s5p64x0/cpu.c @@ -16,7 +16,7 @@ #include <linux/init.h> #include <linux/clk.h> #include <linux/io.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/serial_core.h> #include <linux/platform_device.h> #include <linux/sched.h> @@ -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 69927243d25f..23f9b22439c9 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); diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c index fd2708e7d8a9..af52c09291b1 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c @@ -21,7 +21,7 @@ #include <linux/init.h> #include <linux/clk.h> #include <linux/io.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/serial_core.h> #include <linux/platform_device.h> #include <linux/sched.h> @@ -143,17 +143,18 @@ void __init s5pc100_init_irq(void) s5p_init_irq(vic, ARRAY_SIZE(vic)); } -static struct sysdev_class s5pc100_sysclass = { - .name = "s5pc100-core", +static struct bus_type s5pc100_subsys = { + .name = "s5pc100-core", + .dev_name = "s5pc100-core", }; -static struct sys_device s5pc100_sysdev = { - .cls = &s5pc100_sysclass, +static struct device s5pc100_dev = { + .bus = &s5pc100_subsys, }; static int __init s5pc100_core_init(void) { - return sysdev_class_register(&s5pc100_sysclass); + return subsys_system_register(&s5pc100_subsys, NULL); } core_initcall(s5pc100_core_init); @@ -165,5 +166,5 @@ int __init s5pc100_init(void) /* set idle function */ pm_idle = s5pc100_idle; - return sysdev_register(&s5pc100_sysdev); + return device_register(&s5pc100_sys); } 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 <linux/module.h> #include <linux/clk.h> #include <linux/io.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/platform_device.h> #include <linux/sched.h> #include <linux/dma-mapping.h> @@ -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); diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 40fd7b6b5e66..0122a22eb732 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h @@ -185,20 +185,20 @@ extern struct syscore_ops s3c2416_pm_syscore_ops; extern struct syscore_ops s3c244x_pm_syscore_ops; extern struct syscore_ops s3c64xx_irq_syscore_ops; -/* system device classes */ - -extern struct sysdev_class s3c2410_sysclass; -extern struct sysdev_class s3c2410a_sysclass; -extern struct sysdev_class s3c2412_sysclass; -extern struct sysdev_class s3c2416_sysclass; -extern struct sysdev_class s3c2440_sysclass; -extern struct sysdev_class s3c2442_sysclass; -extern struct sysdev_class s3c2443_sysclass; -extern struct sysdev_class s3c6410_sysclass; -extern struct sysdev_class s3c64xx_sysclass; -extern struct sysdev_class s5p64x0_sysclass; -extern struct sysdev_class s5pv210_sysclass; -extern struct sysdev_class exynos4_sysclass; +/* system device subsystems */ + +extern struct bus_type s3c2410_subsys; +extern struct bus_type s3c2410a_subsys; +extern struct bus_type s3c2412_subsys; +extern struct bus_type s3c2416_subsys; +extern struct bus_type s3c2440_subsys; +extern struct bus_type s3c2442_subsys; +extern struct bus_type s3c2443_subsys; +extern struct bus_type s3c6410_subsys; +extern struct bus_type s3c64xx_subsys; +extern struct bus_type s5p64x0_subsys; +extern struct bus_type s5pv210_subsys; +extern struct bus_type exynos4_subsys; extern void (*s5pc1xx_idle)(void); diff --git a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h index 1c1ed5481253..d01576318b2c 100644 --- a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h +++ b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h @@ -12,7 +12,7 @@ #include <plat/dma-core.h> -extern struct sysdev_class dma_sysclass; +extern struct bus_type dma_subsys; extern struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; #define DMA_CH_VALID (1<<31) diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index dcf68709f9cf..78014e53eb3c 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h @@ -17,7 +17,7 @@ #include <linux/irq.h> -struct sys_device; +struct device; #ifdef CONFIG_PM |