Skip to content

Commit

Permalink
ASoC: Convert fsl directory to module_platform_driver
Browse files Browse the repository at this point in the history
Factor out some boilerplate code.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Timur Tabi <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
AxelLin authored and broonie committed Nov 28, 2011
1 parent 6524c8e commit ba0a7e0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 69 deletions.
15 changes: 1 addition & 14 deletions sound/soc/fsl/fsl_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,20 +992,7 @@ static struct platform_driver fsl_soc_dma_driver = {
.remove = __devexit_p(fsl_soc_dma_remove),
};

static int __init fsl_soc_dma_init(void)
{
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_platform_driver(fsl_soc_dma_driver);

MODULE_AUTHOR("Timur Tabi <[email protected]>");
MODULE_DESCRIPTION("Freescale Elo DMA ASoC PCM Driver");
Expand Down
15 changes: 1 addition & 14 deletions sound/soc/fsl/fsl_ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,20 +793,7 @@ static struct platform_driver fsl_ssi_driver = {
.remove = fsl_ssi_remove,
};

static int __init fsl_ssi_init(void)
{
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_platform_driver(fsl_ssi_driver);

MODULE_AUTHOR("Timur Tabi <[email protected]>");
MODULE_DESCRIPTION("Freescale Synchronous Serial Interface (SSI) ASoC Driver");
Expand Down
12 changes: 1 addition & 11 deletions sound/soc/fsl/mpc5200_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,17 +526,7 @@ static struct platform_driver mpc5200_hpcd_of_driver = {
}
};

static int __init mpc5200_hpcd_init(void)
{
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_platform_driver(mpc5200_hpcd_of_driver);

MODULE_AUTHOR("Grant Likely <[email protected]>");
MODULE_DESCRIPTION("Freescale MPC5200 PSC in DMA mode ASoC Driver");
Expand Down
16 changes: 1 addition & 15 deletions sound/soc/fsl/mpc5200_psc_ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,21 +325,7 @@ static struct 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_platform_driver(psc_ac97_driver);

MODULE_AUTHOR("Jon Smirl <[email protected]>");
MODULE_DESCRIPTION("mpc5200 AC97 module");
Expand Down
16 changes: 1 addition & 15 deletions sound/soc/fsl/mpc5200_psc_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,21 +222,7 @@ static struct 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_platform_driver(psc_i2s_driver);

MODULE_AUTHOR("Grant Likely <[email protected]>");
MODULE_DESCRIPTION("Freescale MPC5200 PSC in I2S mode ASoC Driver");
Expand Down

0 comments on commit ba0a7e0

Please sign in to comment.