From: AngeloGioacchino Del Regno Date: Wed, 22 Feb 2023 09:42:46 +0000 (+0100) Subject: soc: mediatek: mtk-mmsys: Use module_platform_driver() macro X-Git-Tag: v6.6.7~3037^2~3^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=683c7d383fbd413cabe1203eb7df1cc8f39c70d5;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230222094253.23678-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger --- diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c index 6edada2..d698d7a 100644 --- a/drivers/soc/mediatek/mtk-mmsys.c +++ b/drivers/soc/mediatek/mtk-mmsys.c @@ -491,19 +491,7 @@ static struct platform_driver mtk_mmsys_drv = { .probe = mtk_mmsys_probe, .remove = mtk_mmsys_remove, }; - -static int __init mtk_mmsys_init(void) -{ - return platform_driver_register(&mtk_mmsys_drv); -} - -static void __exit mtk_mmsys_exit(void) -{ - platform_driver_unregister(&mtk_mmsys_drv); -} - -module_init(mtk_mmsys_init); -module_exit(mtk_mmsys_exit); +module_platform_driver(mtk_mmsys_drv); MODULE_AUTHOR("Yongqiang Niu "); MODULE_DESCRIPTION("MediaTek SoC MMSYS driver");