Wait for completion forever is very dangerous, make system
die is very bad.
Change-Id: Ib447b9bbf3564b5107b33edec331d4925241fc45
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
spin_unlock(&vop->reg_lock);
- wait_for_completion(&vop->dsp_hold_completion);
+ WARN_ON(!wait_for_completion_timeout(&vop->dsp_hold_completion,
+ msecs_to_jiffies(50)));
vop_dsp_hold_valid_irq_disable(vop);
spin_unlock(&vop->reg_lock);
- wait_for_completion(&vop->dsp_hold_completion);
+ WARN_ON(!wait_for_completion_timeout(&vop->dsp_hold_completion,
+ msecs_to_jiffies(50)));
vop_dsp_hold_valid_irq_disable(vop);
}