Commit 1ff56edf authored by Zhang Jianhua's avatar Zhang Jianhua Committed by Alexandre Belloni

rtc: fsl-ftm-alarm: Use module_platform_driver replace device_initcall

The ftm_rtc_driver has been registered while module init, however there
is not unregister step for module exit, now use the macro
module_platform_driver replace device_initcall, which can register and
unregister platform driver automatically.
Signed-off-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Link: https://lore.kernel.org/r/20220906143037.1455317-1-chris.zjh@huawei.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 97e78b64
......@@ -327,12 +327,7 @@ static struct platform_driver ftm_rtc_driver = {
},
};
static int __init ftm_alarm_init(void)
{
return platform_driver_register(&ftm_rtc_driver);
}
device_initcall(ftm_alarm_init);
module_platform_driver(ftm_rtc_driver);
MODULE_DESCRIPTION("NXP/Freescale FlexTimer alarm driver");
MODULE_AUTHOR("Biwen Li <biwen.li@nxp.com>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment