Merge "msm: actuator: Add protection condition for move focus"
This commit is contained in:
commit
56b42b0237
1 changed files with 4 additions and 1 deletions
|
@ -573,7 +573,10 @@ static int32_t msm_actuator_move_focus(
|
|||
|
||||
CDBG("called, dir %d, num_steps %d\n", dir, num_steps);
|
||||
|
||||
if (dest_step_pos == a_ctrl->curr_step_pos)
|
||||
if ((dest_step_pos == a_ctrl->curr_step_pos) ||
|
||||
((dest_step_pos <= a_ctrl->total_steps) &&
|
||||
(a_ctrl->step_position_table[dest_step_pos] ==
|
||||
a_ctrl->step_position_table[a_ctrl->curr_step_pos])))
|
||||
return rc;
|
||||
|
||||
if ((sign_dir > MSM_ACTUATOR_MOVE_SIGNED_NEAR) ||
|
||||
|
|
Loading…
Add table
Reference in a new issue