Skip to content

Commit

Permalink
cpufreq: mediatek: Use module_init and add module_exit
Browse files Browse the repository at this point in the history
[ Upstream commit b707018 ]

- Use module_init instead of device_initcall.
- Add a function for module_exit to unregister driver.

Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jiaweichang-mtk authored and gregkh committed Jun 9, 2022
1 parent 916ed41 commit 93c55d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/cpufreq/mediatek-cpufreq.c
Expand Up @@ -580,7 +580,13 @@ static int __init mtk_cpufreq_driver_init(void)

return 0;
}
device_initcall(mtk_cpufreq_driver_init);
module_init(mtk_cpufreq_driver_init)

static void __exit mtk_cpufreq_driver_exit(void)
{
platform_driver_unregister(&mtk_cpufreq_platdrv);
}
module_exit(mtk_cpufreq_driver_exit)

MODULE_DESCRIPTION("MediaTek CPUFreq driver");
MODULE_AUTHOR("Pi-Cheng Chen <pi-cheng.chen@linaro.org>");
Expand Down

0 comments on commit 93c55d3

Please sign in to comment.