diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-12-22 04:01:38 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-22 04:01:38 +0400 |
commit | 4a858cfc9af87cc60b3113c3b7b377a4305eac6a (patch) | |
tree | 22ab8aa44aab760d2e1afcb8559e4debe6092d28 /arch/arm/mach-s3c64xx/dma.c | |
parent | 8f1e938db9230d9f828420adea96f691c722e473 (diff) | |
download | linux-4a858cfc9af87cc60b3113c3b7b377a4305eac6a.tar.xz |
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/arm/mach-s3c64xx/dma.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/dma.c | 23 |
1 files changed, 12 insertions, 11 deletions
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; } |