Skip to content

Commit 1fccd1e

Browse files
AngeloGioacchino Del Regnombgg
authored andcommitted
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 <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
1 parent dc36768 commit 1fccd1e

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/soc/mediatek/mtk-mutex.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,19 +1067,7 @@ static struct platform_driver mtk_mutex_driver = {
10671067
.of_match_table = mutex_driver_dt_match,
10681068
},
10691069
};
1070-
1071-
static int __init mtk_mutex_init(void)
1072-
{
1073-
return platform_driver_register(&mtk_mutex_driver);
1074-
}
1075-
1076-
static void __exit mtk_mutex_exit(void)
1077-
{
1078-
platform_driver_unregister(&mtk_mutex_driver);
1079-
}
1080-
1081-
module_init(mtk_mutex_init);
1082-
module_exit(mtk_mutex_exit);
1070+
module_platform_driver(mtk_mutex_driver);
10831071

10841072
MODULE_AUTHOR("Yongqiang Niu <[email protected]>");
10851073
MODULE_DESCRIPTION("MediaTek SoC MUTEX driver");

0 commit comments

Comments
 (0)