diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-26 02:11:12 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2011-12-04 21:55:54 -0500 |
commit | c94e910535be72f0c6ac0c69e6acd8d44414e80d (patch) | |
tree | 31cf8423282b9c20ee13a8a701f636d3697ed5e4 /drivers/dma | |
parent | ab59a510c6ad6b3add5125df64843be754782de6 (diff) |
dmaengine: convert drivers/dma/* to use module_platform_driver()
This patch converts the drivers in drivers/dma/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Piotr Ziecik <kosmo@semihalf.com>
Cc: Rongjun Ying <rongjun.ying@csr.com>
Cc: Barry Song <21cnbao@gmail.com>
Cc: Pelagicore AB <info@pelagicore.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/iop-adma.c | 16 | ||||
-rw-r--r-- | drivers/dma/mpc512x_dma.c | 12 | ||||
-rw-r--r-- | drivers/dma/sirf-dma.c | 12 | ||||
-rw-r--r-- | drivers/dma/timb_dma.c | 12 |
4 files changed, 5 insertions, 47 deletions
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 686dc7673b19..04be90b645b8 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -1735,8 +1735,6 @@ static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan) | |||
1735 | spin_unlock_bh(&iop_chan->lock); | 1735 | spin_unlock_bh(&iop_chan->lock); |
1736 | } | 1736 | } |
1737 | 1737 | ||
1738 | MODULE_ALIAS("platform:iop-adma"); | ||
1739 | |||
1740 | static struct platform_driver iop_adma_driver = { | 1738 | static struct platform_driver iop_adma_driver = { |
1741 | .probe = iop_adma_probe, | 1739 | .probe = iop_adma_probe, |
1742 | .remove = __devexit_p(iop_adma_remove), | 1740 | .remove = __devexit_p(iop_adma_remove), |
@@ -1746,19 +1744,9 @@ static struct platform_driver iop_adma_driver = { | |||
1746 | }, | 1744 | }, |
1747 | }; | 1745 | }; |
1748 | 1746 | ||
1749 | static int __init iop_adma_init(void) | 1747 | module_platform_driver(iop_adma_driver); |
1750 | { | ||
1751 | return platform_driver_register(&iop_adma_driver); | ||
1752 | } | ||
1753 | |||
1754 | static void __exit iop_adma_exit(void) | ||
1755 | { | ||
1756 | platform_driver_unregister(&iop_adma_driver); | ||
1757 | return; | ||
1758 | } | ||
1759 | module_exit(iop_adma_exit); | ||
1760 | module_init(iop_adma_init); | ||
1761 | 1748 | ||
1762 | MODULE_AUTHOR("Intel Corporation"); | 1749 | MODULE_AUTHOR("Intel Corporation"); |
1763 | MODULE_DESCRIPTION("IOP ADMA Engine Driver"); | 1750 | MODULE_DESCRIPTION("IOP ADMA Engine Driver"); |
1764 | MODULE_LICENSE("GPL"); | 1751 | MODULE_LICENSE("GPL"); |
1752 | MODULE_ALIAS("platform:iop-adma"); | ||
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 8ba4edc6185e..4d6d4cf66949 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c | |||
@@ -835,17 +835,7 @@ static struct platform_driver mpc_dma_driver = { | |||
835 | }, | 835 | }, |
836 | }; | 836 | }; |
837 | 837 | ||
838 | static int __init mpc_dma_init(void) | 838 | module_platform_driver(mpc_dma_driver); |
839 | { | ||
840 | return platform_driver_register(&mpc_dma_driver); | ||
841 | } | ||
842 | module_init(mpc_dma_init); | ||
843 | |||
844 | static void __exit mpc_dma_exit(void) | ||
845 | { | ||
846 | platform_driver_unregister(&mpc_dma_driver); | ||
847 | } | ||
848 | module_exit(mpc_dma_exit); | ||
849 | 839 | ||
850 | MODULE_LICENSE("GPL"); | 840 | MODULE_LICENSE("GPL"); |
851 | MODULE_AUTHOR("Piotr Ziecik <kosmo@semihalf.com>"); | 841 | MODULE_AUTHOR("Piotr Ziecik <kosmo@semihalf.com>"); |
diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index 55ec67997670..2333810d1688 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c | |||
@@ -699,17 +699,7 @@ static struct platform_driver sirfsoc_dma_driver = { | |||
699 | }, | 699 | }, |
700 | }; | 700 | }; |
701 | 701 | ||
702 | static int __init sirfsoc_dma_init(void) | 702 | module_platform_driver(sirfsoc_dma_driver); |
703 | { | ||
704 | return platform_driver_register(&sirfsoc_dma_driver); | ||
705 | } | ||
706 | module_init(sirfsoc_dma_init); | ||
707 | |||
708 | static void __exit sirfsoc_dma_exit(void) | ||
709 | { | ||
710 | platform_driver_unregister(&sirfsoc_dma_driver); | ||
711 | } | ||
712 | module_exit(sirfsoc_dma_exit); | ||
713 | 703 | ||
714 | MODULE_AUTHOR("Rongjun Ying <rongjun.ying@csr.com>, " | 704 | MODULE_AUTHOR("Rongjun Ying <rongjun.ying@csr.com>, " |
715 | "Barry Song <baohua.song@csr.com>"); | 705 | "Barry Song <baohua.song@csr.com>"); |
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index d142ae1fce52..a6f9c1684a0f 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c | |||
@@ -841,17 +841,7 @@ static struct platform_driver td_driver = { | |||
841 | .remove = __exit_p(td_remove), | 841 | .remove = __exit_p(td_remove), |
842 | }; | 842 | }; |
843 | 843 | ||
844 | static int __init td_init(void) | 844 | module_platform_driver(td_driver); |
845 | { | ||
846 | return platform_driver_register(&td_driver); | ||
847 | } | ||
848 | module_init(td_init); | ||
849 | |||
850 | static void __exit td_exit(void) | ||
851 | { | ||
852 | platform_driver_unregister(&td_driver); | ||
853 | } | ||
854 | module_exit(td_exit); | ||
855 | 845 | ||
856 | MODULE_LICENSE("GPL v2"); | 846 | MODULE_LICENSE("GPL v2"); |
857 | MODULE_DESCRIPTION("Timberdale DMA controller driver"); | 847 | MODULE_DESCRIPTION("Timberdale DMA controller driver"); |