* [PATCH] ASoC: Convert mxs directory to module_platform_driver
@ 2011-11-24 6:21 Axel Lin
2011-11-24 7:57 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2011-11-24 6:21 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Dong Aisheng, Wolfram Sang, Liam Girdwood
Factor out some boilerplate code.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/mxs/mxs-pcm.c | 12 +-----------
sound/soc/mxs/mxs-saif.c | 12 +-----------
sound/soc/mxs/mxs-sgtl5000.c | 12 +-----------
3 files changed, 3 insertions(+), 33 deletions(-)
diff --git a/sound/soc/mxs/mxs-pcm.c b/sound/soc/mxs/mxs-pcm.c
index dea5aa4..612ad3d 100644
--- a/sound/soc/mxs/mxs-pcm.c
+++ b/sound/soc/mxs/mxs-pcm.c
@@ -346,14 +346,4 @@ static struct platform_driver mxs_pcm_driver = {
.remove = __devexit_p(mxs_soc_platform_remove),
};
-static int __init snd_mxs_pcm_init(void)
-{
- return platform_driver_register(&mxs_pcm_driver);
-}
-module_init(snd_mxs_pcm_init);
-
-static void __exit snd_mxs_pcm_exit(void)
-{
- platform_driver_unregister(&mxs_pcm_driver);
-}
-module_exit(snd_mxs_pcm_exit);
+module_platform_driver(mxs_pcm_driver);
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 76dc74d..ffc83761 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -781,18 +781,8 @@ static struct platform_driver mxs_saif_driver = {
},
};
-static int __init mxs_saif_init(void)
-{
- return platform_driver_register(&mxs_saif_driver);
-}
-
-static void __exit mxs_saif_exit(void)
-{
- platform_driver_unregister(&mxs_saif_driver);
-}
+module_platform_driver(mxs_saif_driver);
-module_init(mxs_saif_init);
-module_exit(mxs_saif_exit);
MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_DESCRIPTION("MXS ASoC SAIF driver");
MODULE_LICENSE("GPL");
diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c
index 7fbeaec..200a928 100644
--- a/sound/soc/mxs/mxs-sgtl5000.c
+++ b/sound/soc/mxs/mxs-sgtl5000.c
@@ -156,17 +156,7 @@ static struct platform_driver mxs_sgtl5000_audio_driver = {
.remove = __devexit_p(mxs_sgtl5000_remove),
};
-static int __init mxs_sgtl5000_init(void)
-{
- return platform_driver_register(&mxs_sgtl5000_audio_driver);
-}
-module_init(mxs_sgtl5000_init);
-
-static void __exit mxs_sgtl5000_exit(void)
-{
- platform_driver_unregister(&mxs_sgtl5000_audio_driver);
-}
-module_exit(mxs_sgtl5000_exit);
+module_platform_driver(mxs_sgtl5000_audio_driver);
MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_DESCRIPTION("MXS ALSA SoC Machine driver");
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Convert mxs directory to module_platform_driver
2011-11-24 6:21 [PATCH] ASoC: Convert mxs directory to module_platform_driver Axel Lin
@ 2011-11-24 7:57 ` Wolfram Sang
2011-11-24 8:50 ` Dong Aisheng-B29396
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2011-11-24 7:57 UTC (permalink / raw)
To: Axel Lin; +Cc: alsa-devel, Mark Brown, Dong Aisheng, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 357 bytes --]
On Thu, Nov 24, 2011 at 02:21:29PM +0800, Axel Lin wrote:
> Factor out some boilerplate code.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Convert mxs directory to module_platform_driver
2011-11-24 7:57 ` Wolfram Sang
@ 2011-11-24 8:50 ` Dong Aisheng-B29396
0 siblings, 0 replies; 3+ messages in thread
From: Dong Aisheng-B29396 @ 2011-11-24 8:50 UTC (permalink / raw)
To: Wolfram Sang, Axel Lin
Cc: alsa-devel@alsa-project.org, Mark Brown, Liam Girdwood
> -----Original Message-----
> From: Wolfram Sang [mailto:w.sang@pengutronix.de]
> Sent: Thursday, November 24, 2011 3:57 PM
> To: Axel Lin
> Cc: alsa-devel@alsa-project.org; Dong Aisheng-B29396; Liam Girdwood; Mark
> Brown
> Subject: Re: [PATCH] ASoC: Convert mxs directory to
> module_platform_driver
>
> On Thu, Nov 24, 2011 at 02:21:29PM +0800, Axel Lin wrote:
> > Factor out some boilerplate code.
> >
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
>
> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Regards
Dong Aisheng
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-24 8:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24 6:21 [PATCH] ASoC: Convert mxs directory to module_platform_driver Axel Lin
2011-11-24 7:57 ` Wolfram Sang
2011-11-24 8:50 ` Dong Aisheng-B29396
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.