summaryrefslogtreecommitdiff
path: root/drivers/dma/iop-adma.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-26 15:11:12 +0800
committerVinod Koul <vinod.koul@linux.intel.com>2011-12-05 08:25:54 +0530
commitc94e910535be72f0c6ac0c69e6acd8d44414e80d (patch)
tree31cf8423282b9c20ee13a8a701f636d3697ed5e4 /drivers/dma/iop-adma.c
parentab59a510c6ad6b3add5125df64843be754782de6 (diff)
downloadlwn-c94e910535be72f0c6ac0c69e6acd8d44414e80d.tar.gz
lwn-c94e910535be72f0c6ac0c69e6acd8d44414e80d.zip
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/iop-adma.c')
-rw-r--r--drivers/dma/iop-adma.c16
1 files changed, 2 insertions, 14 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)
spin_unlock_bh(&iop_chan->lock);
}
-MODULE_ALIAS("platform:iop-adma");
-
static struct platform_driver iop_adma_driver = {
.probe = iop_adma_probe,
.remove = __devexit_p(iop_adma_remove),
@@ -1746,19 +1744,9 @@ static struct platform_driver iop_adma_driver = {
},
};
-static int __init iop_adma_init(void)
-{
- return platform_driver_register(&iop_adma_driver);
-}
-
-static void __exit iop_adma_exit(void)
-{
- platform_driver_unregister(&iop_adma_driver);
- return;
-}
-module_exit(iop_adma_exit);
-module_init(iop_adma_init);
+module_platform_driver(iop_adma_driver);
MODULE_AUTHOR("Intel Corporation");
MODULE_DESCRIPTION("IOP ADMA Engine Driver");
MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:iop-adma");