diff options
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 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/dmapool.h> | 18 | #include <linux/dmapool.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/device.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
@@ -35,7 +35,7 @@ | |||
35 | /* dma channel state information */ | 35 | /* dma channel state information */ |
36 | 36 | ||
37 | struct s3c64xx_dmac { | 37 | struct s3c64xx_dmac { |
38 | struct sys_device sysdev; | 38 | struct device dev; |
39 | struct clk *clk; | 39 | struct clk *clk; |
40 | void __iomem *regs; | 40 | void __iomem *regs; |
41 | struct s3c2410_dma_chan *channels; | 41 | struct s3c2410_dma_chan *channels; |
@@ -631,8 +631,9 @@ static irqreturn_t s3c64xx_dma_irq(int irq, void *pw) | |||
631 | return IRQ_HANDLED; | 631 | return IRQ_HANDLED; |
632 | } | 632 | } |
633 | 633 | ||
634 | static struct sysdev_class dma_sysclass = { | 634 | static struct bus_type dma_subsys = { |
635 | .name = "s3c64xx-dma", | 635 | .name = "s3c64xx-dma", |
636 | .dev_name = "s3c64xx-dma", | ||
636 | }; | 637 | }; |
637 | 638 | ||
638 | static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, | 639 | 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, | |||
651 | return -ENOMEM; | 652 | return -ENOMEM; |
652 | } | 653 | } |
653 | 654 | ||
654 | dmac->sysdev.id = chno / 8; | 655 | dmac->dev.id = chno / 8; |
655 | dmac->sysdev.cls = &dma_sysclass; | 656 | dmac->dev.bus = &dma_subsys; |
656 | 657 | ||
657 | err = sysdev_register(&dmac->sysdev); | 658 | err = device_register(&dmac->dev); |
658 | if (err) { | 659 | if (err) { |
659 | printk(KERN_ERR "%s: failed to register sysdevice\n", __func__); | 660 | printk(KERN_ERR "%s: failed to register device\n", __func__); |
660 | goto err_alloc; | 661 | goto err_alloc; |
661 | } | 662 | } |
662 | 663 | ||
@@ -667,7 +668,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, | |||
667 | goto err_dev; | 668 | goto err_dev; |
668 | } | 669 | } |
669 | 670 | ||
670 | snprintf(clkname, sizeof(clkname), "dma%d", dmac->sysdev.id); | 671 | snprintf(clkname, sizeof(clkname), "dma%d", dmac->dev.id); |
671 | 672 | ||
672 | dmac->clk = clk_get(NULL, clkname); | 673 | dmac->clk = clk_get(NULL, clkname); |
673 | if (IS_ERR(dmac->clk)) { | 674 | if (IS_ERR(dmac->clk)) { |
@@ -715,7 +716,7 @@ err_clk: | |||
715 | err_map: | 716 | err_map: |
716 | iounmap(regs); | 717 | iounmap(regs); |
717 | err_dev: | 718 | err_dev: |
718 | sysdev_unregister(&dmac->sysdev); | 719 | device_unregister(&dmac->dev); |
719 | err_alloc: | 720 | err_alloc: |
720 | kfree(dmac); | 721 | kfree(dmac); |
721 | return err; | 722 | return err; |
@@ -733,9 +734,9 @@ static int __init s3c64xx_dma_init(void) | |||
733 | return -ENOMEM; | 734 | return -ENOMEM; |
734 | } | 735 | } |
735 | 736 | ||
736 | ret = sysdev_class_register(&dma_sysclass); | 737 | ret = subsys_system_register(&dma_subsys, NULL); |
737 | if (ret) { | 738 | if (ret) { |
738 | printk(KERN_ERR "%s: failed to create sysclass\n", __func__); | 739 | printk(KERN_ERR "%s: failed to create subsys\n", __func__); |
739 | return -ENOMEM; | 740 | return -ENOMEM; |
740 | } | 741 | } |
741 | 742 | ||