Commit e5b56aa7 authored by Even Xu's avatar Even Xu Committed by Jiri Kosina

HID: intel-ish-hid: ipc: use msleep_interrupt() for wait

set_current_task() must be called before schedule_timeout(), for this
driver, in order to avoid incorrect usage, use msleep_interrupt()
instead.
Signed-off-by: default avatarEven Xu <even.xu@intel.com>
Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 7ede704d
...@@ -539,6 +539,8 @@ static int ish_fw_reset_handler(struct ishtp_device *dev) ...@@ -539,6 +539,8 @@ static int ish_fw_reset_handler(struct ishtp_device *dev)
return 0; return 0;
} }
#define TIMEOUT_FOR_HW_RDY_MS 300
/** /**
* ish_fw_reset_work_fn() - FW reset worker function * ish_fw_reset_work_fn() - FW reset worker function
* @unused: not used * @unused: not used
...@@ -552,7 +554,7 @@ static void fw_reset_work_fn(struct work_struct *unused) ...@@ -552,7 +554,7 @@ static void fw_reset_work_fn(struct work_struct *unused)
rv = ish_fw_reset_handler(ishtp_dev); rv = ish_fw_reset_handler(ishtp_dev);
if (!rv) { if (!rv) {
/* ISH is ILUP & ISHTP-ready. Restart ISHTP */ /* ISH is ILUP & ISHTP-ready. Restart ISHTP */
schedule_timeout(HZ / 3); msleep_interruptible(TIMEOUT_FOR_HW_RDY_MS);
ishtp_dev->recvd_hw_ready = 1; ishtp_dev->recvd_hw_ready = 1;
wake_up_interruptible(&ishtp_dev->wait_hw_ready); wake_up_interruptible(&ishtp_dev->wait_hw_ready);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment