From: Nobuhiro Iwamatsu Date: Mon, 31 May 2021 05:12:03 +0000 (+0900) Subject: ASoC: mediatek: mt6359: convert to use module_platform_driver X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=edcade2e5e942453f001bd7a0d31f55059cec34f;p=linux.git 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 Link: https://lore.kernel.org/r/20210531051203.228567-1-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c index 78314187d37ef..aec77f0ac3bb2 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");