[alsa-devel] [PATCH 2/2] ASoC: Convert tegra_spdif to use module_platform_driver()
Axel Lin
axel.lin at gmail.com
Mon Nov 28 11:55:03 CET 2011
Use the module_platform_driver() macro which makes
the code smaller and a bit simpler.
Signed-off-by: Axel Lin <axel.lin at gmail.com>
---
sound/soc/tegra/tegra_spdif.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/sound/soc/tegra/tegra_spdif.c b/sound/soc/tegra/tegra_spdif.c
index ea9c920..475428c 100644
--- a/sound/soc/tegra/tegra_spdif.c
+++ b/sound/soc/tegra/tegra_spdif.c
@@ -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 <swarren at nvidia.com>");
MODULE_DESCRIPTION("Tegra SPDIF ASoC driver");
--
1.7.5.4
More information about the Alsa-devel
mailing list