Skip to contentSkip to conversation

ASoC: Convert smdk_wm8994pcm to use module_platform_driver()

PATCH Applied Axel Lin 3 participants 5 messages Nov 28, 2011 – Nov 29, 2011

Subsystems (4)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 ASoC: Convert smdk_wm8994pcm to use module_platform_driver()

Use the module_platform_driver() macro which makes the code smaller and a bit simpler.

---
 sound/soc/samsung/smdk_wm8994pcm.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)
sound/soc/samsung/smdk_wm8994pcm.c +1 -13
index da9c2a2..23c7fb7 100644
@@ -158,19 +158,7 @@ static struct platform_driver snd_smdk_driver = {
 	.remove = __devexit_p(snd_smdk_remove),
 };
 
-static int __init smdk_audio_init(void)
-{
-	return platform_driver_register(&snd_smdk_driver);
-}
-
-module_init(smdk_audio_init);
-
-static void __exit smdk_audio_exit(void)
-{
-	platform_driver_unregister(&snd_smdk_driver);
-}
-
-module_exit(smdk_audio_exit);
+module_platform_driver(snd_smdk_driver);
 
 MODULE_AUTHOR("Sangbeom Kim, <[email protected]>");
 MODULE_DESCRIPTION("ALSA SoC SMDK WM8994 for PCM");
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 2/2 ASoC: Convert tegra_spdif to use module_platform_driver()

Use the module_platform_driver() macro which makes the code smaller and a bit simpler.

---
 sound/soc/tegra/tegra_spdif.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
sound/soc/tegra/tegra_spdif.c +1 -11
index ea9c920..475428c 100644
@@ -352,17 +352,7 @@ static struct platform_driver tegra_spdif_driver = {
 	.remove = __devexit_p(tegra_spdif_platform_remove),
 };
 
-static int __init snd_tegra_spdif_init(void)
-{
-	return platform_driver_register(&tegra_spdif_driver);
-}
-module_init(snd_tegra_spdif_init);
-
-static void __exit snd_tegra_spdif_exit(void)
-{
-	platform_driver_unregister(&tegra_spdif_driver);
-}
-module_exit(snd_tegra_spdif_exit);
+module_platform_driver(tegra_spdif_driver);
 
 MODULE_AUTHOR("Stephen Warren <[email protected]>");
 MODULE_DESCRIPTION("Tegra SPDIF ASoC driver");
Signature · 1 line
1.7.5.4
Applied
#3 lore raw

Re: [PATCH 2/2] ASoC: Convert tegra_spdif to use module_platform_driver()

In reply to Axel Lin
Quoted 2 lines · Axel Lin

Use the module_platform_driver() macro which makes the code smaller and a bit simpler.

Applied, thanks.

Applied
#4 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

Use the module_platform_driver() macro which makes the code smaller and a bit simpler.

Applied, thanks.