summaryrefslogtreecommitdiff
path: root/drivers/soc/mediatek/mtk-mutex.c
diff options
context:
space:
mode:
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>2023-02-22 12:42:51 +0300
committerMatthias Brugger <matthias.bgg@gmail.com>2023-04-02 19:52:02 +0300
commit1fccd1ef65b2b100b53b534894366f575b390e70 (patch)
tree3981f93810a8d997785cacf4a5fa9dd4d877e6aa /drivers/soc/mediatek/mtk-mutex.c
parentdc36768d05bc877b1227b09af1bb304a28284ce3 (diff)
downloadlinux-1fccd1ef65b2b100b53b534894366f575b390e70.tar.xz
soc: mediatek: mtk-mutex: Use module_platform_driver() macro
Replace open-coded init/exit calls with the module_platform_driver() macro being equivalent. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20230222094253.23678-8-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Diffstat (limited to 'drivers/soc/mediatek/mtk-mutex.c')
-rw-r--r--drivers/soc/mediatek/mtk-mutex.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
index b68bb87bc365..b106f3d23e0d 100644
--- a/drivers/soc/mediatek/mtk-mutex.c
+++ b/drivers/soc/mediatek/mtk-mutex.c
@@ -1067,19 +1067,7 @@ static struct platform_driver mtk_mutex_driver = {
.of_match_table = mutex_driver_dt_match,
},
};
-
-static int __init mtk_mutex_init(void)
-{
- return platform_driver_register(&mtk_mutex_driver);
-}
-
-static void __exit mtk_mutex_exit(void)
-{
- platform_driver_unregister(&mtk_mutex_driver);
-}
-
-module_init(mtk_mutex_init);
-module_exit(mtk_mutex_exit);
+module_platform_driver(mtk_mutex_driver);
MODULE_AUTHOR("Yongqiang Niu <yongqiang.niu@mediatek.com>");
MODULE_DESCRIPTION("MediaTek SoC MUTEX driver");