summaryrefslogtreecommitdiffstats
path: root/drivers/hid/intel-ish-hid
diff options
context:
space:
mode:
authorEven Xu <even.xu@intel.com>2016-11-11 02:40:33 +0100
committerJiri Kosina <jkosina@suse.cz>2016-11-16 11:42:39 +0100
commite5b56aa7906d6995007ffe11ecc181dd876dabd3 (patch)
treeca1396daaa2ed2a548ea051c8d67c4b3c1c0f011 /drivers/hid/intel-ish-hid
parentHID: intel-ish-hid: ipc: change timed_wait_for_timeout() to be a function (diff)
downloadlinux-e5b56aa7906d6995007ffe11ecc181dd876dabd3.tar.xz
linux-e5b56aa7906d6995007ffe11ecc181dd876dabd3.zip
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: Even Xu <even.xu@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/intel-ish-hid')
-rw-r--r--drivers/hid/intel-ish-hid/ipc/ipc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c
index 3d46cc0eec70..b9bf04a3f267 100644
--- a/drivers/hid/intel-ish-hid/ipc/ipc.c
+++ b/drivers/hid/intel-ish-hid/ipc/ipc.c
@@ -539,6 +539,8 @@ static int ish_fw_reset_handler(struct ishtp_device *dev)
return 0;
}
+#define TIMEOUT_FOR_HW_RDY_MS 300
+
/**
* ish_fw_reset_work_fn() - FW reset worker function
* @unused: not used
@@ -552,7 +554,7 @@ static void fw_reset_work_fn(struct work_struct *unused)
rv = ish_fw_reset_handler(ishtp_dev);
if (!rv) {
/* ISH is ILUP & ISHTP-ready. Restart ISHTP */
- schedule_timeout(HZ / 3);
+ msleep_interruptible(TIMEOUT_FOR_HW_RDY_MS);
ishtp_dev->recvd_hw_ready = 1;
wake_up_interruptible(&ishtp_dev->wait_hw_ready);