Merge "msm: camera: Handle actuator close before power down"

This commit is contained in:
Linux Build Service Account 2018-02-16 14:41:51 -08:00 committed by Gerrit - the friendly Code Review server
commit 47aeb59367

View file

@ -1573,6 +1573,13 @@ static int msm_actuator_close(struct v4l2_subdev *sd,
}
kfree(a_ctrl->i2c_reg_tbl);
a_ctrl->i2c_reg_tbl = NULL;
if (a_ctrl->actuator_state == ACT_OPS_ACTIVE) {
rc = msm_actuator_power_down(a_ctrl);
if (rc < 0) {
pr_err("%s:%d Actuator Power down failed\n",
__func__, __LINE__);
}
}
a_ctrl->actuator_state = ACT_DISABLE_STATE;
mutex_unlock(a_ctrl->actuator_mutex);
CDBG("Exit\n");