For the delay of 10 uSec or more usleep_range is prefered.
Unlike udelay, sleep_range avoids large number of undesired
interrupts.
Ref Documentation/timers/timers-howto.txt
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
while (mwifiex_pcie_ok_to_access_hw(adapter)) {
i++;
- udelay(10);
+ usleep_range(10, 20);
/* 50ms max wait */
if (i == 50000)
break;
card->cmdrsp_buf->len);
while (mwifiex_pcie_ok_to_access_hw(adapter) &&
(count++ < 10))
- udelay(50);
+ usleep_range(50, 60);
} else {
dev_err(adapter->dev, "There is no command but "
"got cmdrsp\n");
}
if (len)
break;
- udelay(10);
+ usleep_range(10, 20);
}
if (!len) {
else if ((cs & bits) == bits)
return 0;
- udelay(10);
+ usleep_range(10, 20);
}
dev_err(adapter->dev, "poll card status failed, tries = %d\n",
if (len)
break;
- udelay(10);
+ usleep_range(10, 20);
}
if (!len) {