diff options
| author | 2021-12-13 10:11:05 +0100 | |
|---|---|---|
| committer | 2021-12-13 10:11:05 +0100 | |
| commit | c45479ecd0c21705ab078ceaba097bbb730a0541 (patch) | |
| tree | 27f028f34c22f6e9cc12da23c429af68ab70cfac /include/linux/delay.h | |
| parent | Merge 5.16-rc4 into usb-next (diff) | |
| parent | Linux 5.16-rc5 (diff) | |
Merge 5.16-rc5 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/delay.h')
| -rw-r--r-- | include/linux/delay.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/delay.h b/include/linux/delay.h index 8eacf67eb212..039e7e0c7378 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h @@ -20,6 +20,7 @@ */ #include <linux/math.h> +#include <linux/sched.h> extern unsigned long loops_per_jiffy; @@ -58,7 +59,18 @@ void calibrate_delay(void); void __attribute__((weak)) calibration_delay_done(void); void msleep(unsigned int msecs); unsigned long msleep_interruptible(unsigned int msecs); -void usleep_range(unsigned long min, unsigned long max); +void usleep_range_state(unsigned long min, unsigned long max, + unsigned int state); + +static inline void usleep_range(unsigned long min, unsigned long max) +{ + usleep_range_state(min, max, TASK_UNINTERRUPTIBLE); +} + +static inline void usleep_idle_range(unsigned long min, unsigned long max) +{ + usleep_range_state(min, max, TASK_IDLE); +} static inline void ssleep(unsigned int seconds) { |
