The probe calls pm_runtime_set_active in the probe, but
has never called dw9807_vcm_resume.
Without a regulator this causes no issue as it just
instructs the VCM to move to the idle position and power
down. With a regulator the pm_runtime_idle calls
dw9807_vcm_suspend, and we get a mismatch in the regulator framework.
Make the active state conditional on having a regulator.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
[sw0312.kim: cherry-pick raspberry pi kernel upstream to support rpi camera module v3]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I3bec010f791f78caf223d74eff9f327a92383988
if (rval < 0)
goto err_cleanup;
- pm_runtime_set_active(&client->dev);
+ if (!dw9807_dev->vdd)
+ pm_runtime_set_active(&client->dev);
pm_runtime_enable(&client->dev);
pm_runtime_idle(&client->dev);