Skip to content

Commit

Permalink
ASoC: Convert txx9 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 <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Nov 25, 2011
1 parent cb5e873 commit 33d316c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
13 changes: 1 addition & 12 deletions sound/soc/txx9/txx9aclc-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,18 +223,7 @@ static struct platform_driver txx9aclc_ac97_driver = {
},
};

static int __init txx9aclc_ac97_init(void)
{
return platform_driver_register(&txx9aclc_ac97_driver);
}

static void __exit txx9aclc_ac97_exit(void)
{
platform_driver_unregister(&txx9aclc_ac97_driver);
}

module_init(txx9aclc_ac97_init);
module_exit(txx9aclc_ac97_exit);
module_platform_driver(txx9aclc_ac97_driver);

MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>");
MODULE_DESCRIPTION("TXx9 ACLC AC97 driver");
Expand Down
12 changes: 1 addition & 11 deletions sound/soc/txx9/txx9aclc.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,17 +438,7 @@ static struct platform_driver txx9aclc_pcm_driver = {
.remove = __devexit_p(txx9aclc_soc_platform_remove),
};

static int __init snd_txx9aclc_pcm_init(void)
{
return platform_driver_register(&txx9aclc_pcm_driver);
}
module_init(snd_txx9aclc_pcm_init);

static void __exit snd_txx9aclc_pcm_exit(void)
{
platform_driver_unregister(&txx9aclc_pcm_driver);
}
module_exit(snd_txx9aclc_pcm_exit);
module_platform_driver(txx9aclc_pcm_driver);

MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>");
MODULE_DESCRIPTION("TXx9 ACLC Audio DMA driver");
Expand Down

0 comments on commit 33d316c

Please sign in to comment.