Skip to contentSkip to conversation

ASoC: Convert mips directory to module_platform_driver

PATCH In review Axel Lin 2 participants 2 messages Nov 24, 2011 Sound

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: Convert mips directory to module_platform_driver

Factor out some boilerplate code.

---
 sound/mips/hal2.c       |   13 +------------
 sound/mips/sgio2audio.c |   13 +------------
 2 files changed, 2 insertions(+), 24 deletions(-)
sound/mips/hal2.c +1 -12
index 2e6c858..5f88d1f 100644
@@ -935,15 +935,4 @@ static struct platform_driver hal2_driver = {
 	}
 };
 
-static int __init alsa_card_hal2_init(void)
-{
-	return platform_driver_register(&hal2_driver);
-}
-
-static void __exit alsa_card_hal2_exit(void)
-{
-	platform_driver_unregister(&hal2_driver);
-}
-
-module_init(alsa_card_hal2_init);
-module_exit(alsa_card_hal2_exit);
+module_platform_driver(hal2_driver);
sound/mips/sgio2audio.c +1 -12
index 69425d4..ceaa593 100644
@@ -976,15 +976,4 @@ static struct platform_driver sgio2audio_driver = {
 	}
 };
 
-static int __init alsa_card_sgio2audio_init(void)
-{
-	return platform_driver_register(&sgio2audio_driver);
-}
-
-static void __exit alsa_card_sgio2audio_exit(void)
-{
-	platform_driver_unregister(&sgio2audio_driver);
-}
-
-module_init(alsa_card_sgio2audio_init)
-module_exit(alsa_card_sgio2audio_exit)
+module_platform_driver(sgio2audio_driver);
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 6 lines · Axel Lin

Factor out some boilerplate code.

---
 sound/mips/hal2.c       |   13 +------------
 sound/mips/sgio2audio.c |   13 +------------

This isn't actually an ASoC change - it's a generic sound change so Takashi would normally take it.