From fd482a3e3e20cddfb6d775ec0382f98a92b8a25e Mon Sep 17 00:00:00 2001 From: Saravana Kannan Date: Wed, 23 Apr 2014 18:10:50 -0500 Subject: regulator: core: Disable unused regulators after deferred probing is done regulator_init_complete does a scan of regulators which dont have always-on or consumers are automatically disabled as being unused. However, with deferred probing, late_initcall() is too soon to declare a regulator as unused as the regulator itself might not have registered due to defferal - Example: A regulator deffered due to i2bus not available which in turn is deffered due to pinctrl availability. Since deferred probing is done in late_initcall(), do the cleanup of unused regulators by regulator_init_complete in late_initcall_sync instead of late_initcall. Cc: Liam Girdwood Cc: Mark Brown Cc: Markus Pargmann Signed-off-by: Saravana Kannan [nm@ti.com: minor rewording] Signed-off-by: Nishanth Menon Signed-off-by: Mark Brown --- drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e3cb9b66731f..236ca3f1df73 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3871,4 +3871,4 @@ unlock: return 0; } -late_initcall(regulator_init_complete); +late_initcall_sync(regulator_init_complete); -- cgit v1.2.3-59-g8ed1b