@@ -1340,7 +1340,7 @@ static int imx214_probe(struct i2c_client *client)
v4l2_ctrl_handler_free(&imx214->ctrls);
error_power_off:
pm_runtime_disable(imx214->dev);
- regulator_bulk_disable(IMX214_NUM_SUPPLIES, imx214->supplies);
+ imx214_power_off(dev);
return ret;
}
@@ -1356,6 +1356,8 @@ static void imx214_remove(struct i2c_client *client)
v4l2_ctrl_handler_free(&imx214->ctrls);
pm_runtime_disable(&client->dev);
+ if (!pm_runtime_status_suspended(&client->dev))
+ imx214_power_off(&client->dev);
pm_runtime_set_suspended(&client->dev);
}