From 7702078207772e07e43dbd98ddb83c7223d60e56 Mon Sep 17 00:00:00 2001 From: Liang Chen Date: Tue, 21 Feb 2023 17:38:31 +0800 Subject: [PATCH] thermal: rockchip: register thermal driver early The voltage level of opp-table depend on thermal driver. Signed-off-by: Liang Chen Change-Id: Id51106a0676cac38027e901d9c30832aba39d8a5 --- drivers/thermal/rockchip_thermal.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 06157da8886d..dc817d73a284 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -2549,7 +2549,17 @@ static struct platform_driver rockchip_thermal_driver = { .shutdown = rockchip_thermal_shutdown, }; -module_platform_driver(rockchip_thermal_driver); +static int __init rockchip_thermal_driver_init(void) +{ + return platform_driver_register(&rockchip_thermal_driver); +} +rootfs_initcall(rockchip_thermal_driver_init); + +static void __exit rockchip_thermal_driver_exit(void) +{ + platform_driver_unregister(&rockchip_thermal_driver); +} +module_exit(rockchip_thermal_driver_exit); MODULE_DESCRIPTION("ROCKCHIP THERMAL Driver"); MODULE_AUTHOR("Rockchip, Inc.");