diff options
-rw-r--r-- | include/linux/delay.h | 6 | ||||
-rw-r--r-- | kernel/timer.c | 22 |
2 files changed, 0 insertions, 28 deletions
diff --git a/include/linux/delay.h b/include/linux/delay.h index 0e303d1aacd8..fd832c6d419e 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h | |||
@@ -45,12 +45,6 @@ extern unsigned long lpj_fine; | |||
45 | void calibrate_delay(void); | 45 | void calibrate_delay(void); |
46 | void msleep(unsigned int msecs); | 46 | void msleep(unsigned int msecs); |
47 | unsigned long msleep_interruptible(unsigned int msecs); | 47 | unsigned long msleep_interruptible(unsigned int msecs); |
48 | void usleep_range(unsigned long min, unsigned long max); | ||
49 | |||
50 | static inline void usleep(unsigned long usecs) | ||
51 | { | ||
52 | usleep_range(usecs, usecs); | ||
53 | } | ||
54 | 48 | ||
55 | static inline void ssleep(unsigned int seconds) | 49 | static inline void ssleep(unsigned int seconds) |
56 | { | 50 | { |
diff --git a/kernel/timer.c b/kernel/timer.c index f110f241ab66..ce98685cd1cb 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1755,25 +1755,3 @@ unsigned long msleep_interruptible(unsigned int msecs) | |||
1755 | } | 1755 | } |
1756 | 1756 | ||
1757 | EXPORT_SYMBOL(msleep_interruptible); | 1757 | EXPORT_SYMBOL(msleep_interruptible); |
1758 | |||
1759 | static int __sched do_usleep_range(unsigned long min, unsigned long max) | ||
1760 | { | ||
1761 | ktime_t kmin; | ||
1762 | unsigned long delta; | ||
1763 | |||
1764 | kmin = ktime_set(0, min * NSEC_PER_USEC); | ||
1765 | delta = max - min; | ||
1766 | return schedule_hrtimeout_range(&kmin, delta, HRTIMER_MODE_REL); | ||
1767 | } | ||
1768 | |||
1769 | /** | ||
1770 | * usleep_range - Drop in replacement for udelay where wakeup is flexible | ||
1771 | * @min: Minimum time in usecs to sleep | ||
1772 | * @max: Maximum time in usecs to sleep | ||
1773 | */ | ||
1774 | void usleep_range(unsigned long min, unsigned long max) | ||
1775 | { | ||
1776 | __set_current_state(TASK_UNINTERRUPTIBLE); | ||
1777 | do_usleep_range(min, max); | ||
1778 | } | ||
1779 | EXPORT_SYMBOL(usleep_range); | ||