提交 ba0a7e02 编写于 作者: A Axel Lin 提交者: Mark Brown

ASoC: Convert fsl directory to module_platform_driver

Factor out some boilerplate code.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Acked-by: NTimur Tabi <timur@freescale.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 6524c8e3
...@@ -992,20 +992,7 @@ static struct platform_driver fsl_soc_dma_driver = { ...@@ -992,20 +992,7 @@ static struct platform_driver fsl_soc_dma_driver = {
.remove = __devexit_p(fsl_soc_dma_remove), .remove = __devexit_p(fsl_soc_dma_remove),
}; };
static int __init fsl_soc_dma_init(void) module_platform_driver(fsl_soc_dma_driver);
{
pr_info("Freescale Elo DMA ASoC PCM Driver\n");
return platform_driver_register(&fsl_soc_dma_driver);
}
static void __exit fsl_soc_dma_exit(void)
{
platform_driver_unregister(&fsl_soc_dma_driver);
}
module_init(fsl_soc_dma_init);
module_exit(fsl_soc_dma_exit);
MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); MODULE_AUTHOR("Timur Tabi <timur@freescale.com>");
MODULE_DESCRIPTION("Freescale Elo DMA ASoC PCM Driver"); MODULE_DESCRIPTION("Freescale Elo DMA ASoC PCM Driver");
......
...@@ -793,20 +793,7 @@ static struct platform_driver fsl_ssi_driver = { ...@@ -793,20 +793,7 @@ static struct platform_driver fsl_ssi_driver = {
.remove = fsl_ssi_remove, .remove = fsl_ssi_remove,
}; };
static int __init fsl_ssi_init(void) module_platform_driver(fsl_ssi_driver);
{
printk(KERN_INFO "Freescale Synchronous Serial Interface (SSI) ASoC Driver\n");
return platform_driver_register(&fsl_ssi_driver);
}
static void __exit fsl_ssi_exit(void)
{
platform_driver_unregister(&fsl_ssi_driver);
}
module_init(fsl_ssi_init);
module_exit(fsl_ssi_exit);
MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); MODULE_AUTHOR("Timur Tabi <timur@freescale.com>");
MODULE_DESCRIPTION("Freescale Synchronous Serial Interface (SSI) ASoC Driver"); MODULE_DESCRIPTION("Freescale Synchronous Serial Interface (SSI) ASoC Driver");
......
...@@ -526,17 +526,7 @@ static struct platform_driver mpc5200_hpcd_of_driver = { ...@@ -526,17 +526,7 @@ static struct platform_driver mpc5200_hpcd_of_driver = {
} }
}; };
static int __init mpc5200_hpcd_init(void) module_platform_driver(mpc5200_hpcd_of_driver);
{
return platform_driver_register(&mpc5200_hpcd_of_driver);
}
module_init(mpc5200_hpcd_init);
static void __exit mpc5200_hpcd_exit(void)
{
platform_driver_unregister(&mpc5200_hpcd_of_driver);
}
module_exit(mpc5200_hpcd_exit);
MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
MODULE_DESCRIPTION("Freescale MPC5200 PSC in DMA mode ASoC Driver"); MODULE_DESCRIPTION("Freescale MPC5200 PSC in DMA mode ASoC Driver");
......
...@@ -325,21 +325,7 @@ static struct platform_driver psc_ac97_driver = { ...@@ -325,21 +325,7 @@ static struct platform_driver psc_ac97_driver = {
}, },
}; };
/* --------------------------------------------------------------------- module_platform_driver(psc_ac97_driver);
* Module setup and teardown; simply register the of_platform driver
* for the PSC in AC97 mode.
*/
static int __init psc_ac97_init(void)
{
return platform_driver_register(&psc_ac97_driver);
}
module_init(psc_ac97_init);
static void __exit psc_ac97_exit(void)
{
platform_driver_unregister(&psc_ac97_driver);
}
module_exit(psc_ac97_exit);
MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>"); MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>");
MODULE_DESCRIPTION("mpc5200 AC97 module"); MODULE_DESCRIPTION("mpc5200 AC97 module");
......
...@@ -222,21 +222,7 @@ static struct platform_driver psc_i2s_driver = { ...@@ -222,21 +222,7 @@ static struct platform_driver psc_i2s_driver = {
}, },
}; };
/* --------------------------------------------------------------------- module_platform_driver(psc_i2s_driver);
* Module setup and teardown; simply register the of_platform driver
* for the PSC in I2S mode.
*/
static int __init psc_i2s_init(void)
{
return platform_driver_register(&psc_i2s_driver);
}
module_init(psc_i2s_init);
static void __exit psc_i2s_exit(void)
{
platform_driver_unregister(&psc_i2s_driver);
}
module_exit(psc_i2s_exit);
MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
MODULE_DESCRIPTION("Freescale MPC5200 PSC in I2S mode ASoC Driver"); MODULE_DESCRIPTION("Freescale MPC5200 PSC in I2S mode ASoC Driver");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册