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 <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20230222094253.23678-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
1 parent 1ef3e78 commit 683c7d3

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

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 <yongqiang.niu@mediatek.com>");
509497
MODULE_DESCRIPTION("MediaTek SoC MMSYS driver");

0 commit comments

Comments
 (0)