diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index cfae5de4dfcb..3a458c3bb02b 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c @@ -416,7 +416,21 @@ static struct platform_driver pwm_regulator_driver = { .probe = pwm_regulator_probe, }; +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +static int __init pwm_regulator_driver_init(void) +{ + return platform_driver_register(&pwm_regulator_driver); +} +subsys_initcall_sync(pwm_regulator_driver_init); + +static void __exit pwm_regulator_driver_exit(void) +{ + platform_driver_unregister(&pwm_regulator_driver); +} +module_exit(pwm_regulator_driver_exit); +#else module_platform_driver(pwm_regulator_driver); +#endif MODULE_LICENSE("GPL"); MODULE_AUTHOR("Lee Jones ");