pwm: Call pwm_sysfs_init() early when CONFIG_INITCALL_ASYNC=y

rockchip_pwm_driver_init() -> rockchip_pwm_probe() -> devm_pwmchip_add()
-> pwmchip_add() -> pwmchip_sysfs_export()
pwmchip_sysfs_export() depends on pwm_sysfs_init() to init pwm_class.
But rockchip_pwm_driver_init() and pwm_sysfs_init() are both in the same
subsys_initcall level.

Fix this by move pwm_sysfs_init() to the postcore_initcall level.

Change-Id: If865768904be463732a5d2cb9f6ee2e9b333c0b3
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2020-04-26 20:30:02 +08:00
parent 081aacf209
commit 688b53c7af

View File

@@ -660,4 +660,8 @@ static int __init pwm_sysfs_init(void)
{
return class_register(&pwm_class);
}
#ifdef CONFIG_INITCALL_ASYNC
postcore_initcall(pwm_sysfs_init);
#else
subsys_initcall(pwm_sysfs_init);
#endif