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-s3c64xx/cpu.c | 19 ++++++++++--------- arch/arm/mach-s3c64xx/dma.c | 23 ++++++++++++----------- arch/arm/mach-s3c64xx/s3c6400.c | 15 ++++++++------- arch/arm/mach-s3c64xx/s3c6410.c | 15 ++++++++------- 4 files changed, 38 insertions(+), 34 deletions(-) (limited to 'arch/arm/mach-s3c64xx') diff --git a/arch/arm/mach-s3c64xx/cpu.c b/arch/arm/mach-s3c64xx/cpu.c index de085b798aa..0f8a669dc7f 100644 --- a/arch/arm/mach-s3c64xx/cpu.c +++ b/arch/arm/mach-s3c64xx/cpu.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -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 17d62f4f820..f2a7a172559 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -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 7a3bc32df42..691a7ca78c1 100644 --- a/arch/arm/mach-s3c64xx/s3c6400.c +++ b/arch/arm/mach-s3c64xx/s3c6400.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include @@ -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 4117003464a..9a5484ad430 100644 --- a/arch/arm/mach-s3c64xx/s3c6410.c +++ b/arch/arm/mach-s3c64xx/s3c6410.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include @@ -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); } -- cgit v1.2.3