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>
This commit is contained in:
		
					parent
					
						
							
								ab59a510c6
							
						
					
				
			
			
				commit
				
					
						c94e910535
					
				
			
		
					 4 changed files with 5 additions and 47 deletions
				
			
		| 
						 | 
					@ -1735,8 +1735,6 @@ static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan)
 | 
				
			||||||
	spin_unlock_bh(&iop_chan->lock);
 | 
						spin_unlock_bh(&iop_chan->lock);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MODULE_ALIAS("platform:iop-adma");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct platform_driver iop_adma_driver = {
 | 
					static struct platform_driver iop_adma_driver = {
 | 
				
			||||||
	.probe		= iop_adma_probe,
 | 
						.probe		= iop_adma_probe,
 | 
				
			||||||
	.remove		= __devexit_p(iop_adma_remove),
 | 
						.remove		= __devexit_p(iop_adma_remove),
 | 
				
			||||||
| 
						 | 
					@ -1746,19 +1744,9 @@ static struct platform_driver iop_adma_driver = {
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int __init iop_adma_init(void)
 | 
					module_platform_driver(iop_adma_driver);
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	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_AUTHOR("Intel Corporation");
 | 
					MODULE_AUTHOR("Intel Corporation");
 | 
				
			||||||
MODULE_DESCRIPTION("IOP ADMA Engine Driver");
 | 
					MODULE_DESCRIPTION("IOP ADMA Engine Driver");
 | 
				
			||||||
MODULE_LICENSE("GPL");
 | 
					MODULE_LICENSE("GPL");
 | 
				
			||||||
 | 
					MODULE_ALIAS("platform:iop-adma");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -835,17 +835,7 @@ static struct platform_driver mpc_dma_driver = {
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int __init mpc_dma_init(void)
 | 
					module_platform_driver(mpc_dma_driver);
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return platform_driver_register(&mpc_dma_driver);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
module_init(mpc_dma_init);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void __exit mpc_dma_exit(void)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	platform_driver_unregister(&mpc_dma_driver);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
module_exit(mpc_dma_exit);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
MODULE_LICENSE("GPL");
 | 
					MODULE_LICENSE("GPL");
 | 
				
			||||||
MODULE_AUTHOR("Piotr Ziecik <kosmo@semihalf.com>");
 | 
					MODULE_AUTHOR("Piotr Ziecik <kosmo@semihalf.com>");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -699,17 +699,7 @@ static struct platform_driver sirfsoc_dma_driver = {
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int __init sirfsoc_dma_init(void)
 | 
					module_platform_driver(sirfsoc_dma_driver);
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return platform_driver_register(&sirfsoc_dma_driver);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
module_init(sirfsoc_dma_init);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void __exit sirfsoc_dma_exit(void)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	platform_driver_unregister(&sirfsoc_dma_driver);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
module_exit(sirfsoc_dma_exit);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
MODULE_AUTHOR("Rongjun Ying <rongjun.ying@csr.com>, "
 | 
					MODULE_AUTHOR("Rongjun Ying <rongjun.ying@csr.com>, "
 | 
				
			||||||
	"Barry Song <baohua.song@csr.com>");
 | 
						"Barry Song <baohua.song@csr.com>");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -841,17 +841,7 @@ static struct platform_driver td_driver = {
 | 
				
			||||||
	.remove	= __exit_p(td_remove),
 | 
						.remove	= __exit_p(td_remove),
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int __init td_init(void)
 | 
					module_platform_driver(td_driver);
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return platform_driver_register(&td_driver);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
module_init(td_init);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void __exit td_exit(void)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	platform_driver_unregister(&td_driver);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
module_exit(td_exit);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
MODULE_LICENSE("GPL v2");
 | 
					MODULE_LICENSE("GPL v2");
 | 
				
			||||||
MODULE_DESCRIPTION("Timberdale DMA controller driver");
 | 
					MODULE_DESCRIPTION("Timberdale DMA controller driver");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue