BZ: 34961
HSU driver might delete timer without sync in tasklet. The pending
timer might exist before next add_timer. It is better to use
mod_timer instead of add_timer.
Change-Id: I5762791f70a011b05e9e57d614a6e041ad27a400
Signed-off-by: Bin Yang <bin.yang@intel.com>
Reviewed-on: http://android.intel.com:8080/47762
Reviewed-by: Cai, Stanley W <stanley.w.cai@intel.com>
Reviewed-by: Kuppuswamy, Sathyanarayanan <sathyanarayanan.kuppuswamy@intel.com>
Tested-by: Wang, Zhifeng <zhifeng.wang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
chan_writel(chan, HSU_CH_CR, 0x3);
if (dmarx_need_timer()) {
- chan->rx_timer.expires =
- jiffies + HSU_DMA_TIMEOUT_CHECK_FREQ;
- add_timer(&chan->rx_timer);
+ mod_timer(&chan->rx_timer,
+ jiffies + HSU_DMA_TIMEOUT_CHECK_FREQ);
runtime_suspend_delay(up);
}