[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210531051203.228567-1-nobuhiro1.iwamatsu@toshiba.co.jp>
Date: Mon, 31 May 2021 14:12:03 +0900
From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Takashi Iwai <tiwai@...e.com>,
Argus Lin <argus.lin@...iatek.com>
Cc: Jaroslav Kysela <perex@...ex.cz>,
Matthias Brugger <matthias.bgg@...il.com>,
Colin Ian King <colin.king@...onical.com>,
alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
Subject: [PATCH] ASoC: mediatek: mt6359: convert to use module_platform_driver
Simplify the code by using module_platform_driver macro for
mt6359-accdet.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
---
sound/soc/codecs/mt6359-accdet.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c
index 4222aed013f106..b2354a613b1587 100644
--- a/sound/soc/codecs/mt6359-accdet.c
+++ b/sound/soc/codecs/mt6359-accdet.c
@@ -1057,22 +1057,7 @@ static struct platform_driver mt6359_accdet_driver = {
.probe = mt6359_accdet_probe,
};
-static int __init mt6359_accdet_driver_init(void)
-{
- int ret = 0;
-
- ret = platform_driver_register(&mt6359_accdet_driver);
- if (ret)
- return -ENODEV;
- return 0;
-}
-
-static void __exit mt6359_accdet_driver_exit(void)
-{
- platform_driver_unregister(&mt6359_accdet_driver);
-}
-module_init(mt6359_accdet_driver_init);
-module_exit(mt6359_accdet_driver_exit);
+module_platform_driver(mt6359_accdet_driver)
/* Module information */
MODULE_DESCRIPTION("MT6359 ALSA SoC codec jack driver");
--
2.30.0
Powered by blists - more mailing lists