aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid/intel-ish-hid/ipc/utils.h
diff options
context:
space:
mode:
authorEven Xu2016-11-11 09:40:23 +0800
committerJiri Kosina2016-11-16 11:42:39 +0100
commit7ede704d746e7c02219cdd44abe22c0b606e70db (patch)
tree7ebe9ae99814988b35b31dc93c3b97e93d9e14df /drivers/hid/intel-ish-hid/ipc/utils.h
parentfa39baa9700c86a73b2203eab92dbba7eb2d4d69 (diff)
HID: intel-ish-hid: ipc: change timed_wait_for_timeout() to be a function
The macro timed_wait_for_timeout() only be used in one function, so move this marco from header file and change it to a function in ipc.c, where it is used. 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/ipc/utils.h')
-rw-r--r--drivers/hid/intel-ish-hid/ipc/utils.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/hid/intel-ish-hid/ipc/utils.h b/drivers/hid/intel-ish-hid/ipc/utils.h
deleted file mode 100644
index dc39dfe2464e..000000000000
--- a/drivers/hid/intel-ish-hid/ipc/utils.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Utility macros of ISH
- *
- * Copyright (c) 2014-2016, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- */
-#ifndef UTILS__H
-#define UTILS__H
-
-#define WAIT_FOR_SEND_SLICE (HZ / 10)
-#define WAIT_FOR_CONNECT_SLICE (HZ / 10)
-
-/*
- * Waits for specified event when a thread that triggers event
- * can't signal with timeout (use whenever we may hang)
- */
-#define timed_wait_for_timeout(timeinc, condition, timeout) \
- do { \
- int t = timeout; \
- do { \
- unsigned long j; \
- int done = 0; \
- \
- for (j = jiffies, done = 0; !done; ) { \
- schedule_timeout(timeinc); \
- if (time_is_before_eq_jiffies(j + timeinc)) \
- done = 1; \
- } \
- t -= timeinc; \
- if (t <= 0) \
- break; \
- } while (!(condition)); \
- } while (0)
-
-#endif /* UTILS__H */