Skip to content

Commit 683c7d3

Browse files
AngeloGioacchino Del Regnombgg
authored andcommitted
soc: mediatek: mtk-mmsys: Use module_platform_driver() macro
Instead of open-coding init/exit calls, switch to using the module_platform_driver() macro instead, doing the exact same. 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 1ef3e78 commit 683c7d3

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/soc/mediatek/mtk-mmsys.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -491,19 +491,7 @@ static struct platform_driver mtk_mmsys_drv = {
491491
.probe = mtk_mmsys_probe,
492492
.remove = mtk_mmsys_remove,
493493
};
494-
495-
static int __init mtk_mmsys_init(void)
496-
{
497-
return platform_driver_register(&mtk_mmsys_drv);
498-
}
499-
500-
static void __exit mtk_mmsys_exit(void)
501-
{
502-
platform_driver_unregister(&mtk_mmsys_drv);
503-
}
504-
505-
module_init(mtk_mmsys_init);
506-
module_exit(mtk_mmsys_exit);
494+
module_platform_driver(mtk_mmsys_drv);
507495

508496
MODULE_AUTHOR("Yongqiang Niu <[email protected]>");
509497
MODULE_DESCRIPTION("MediaTek SoC MMSYS driver");

0 commit comments

Comments
 (0)