Skip to content

Commit

Permalink
Revert "timer: Added usleep[_range] timer"
Browse files Browse the repository at this point in the history
This reverts commit 22b8f15 to merge
an advanced version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Aug 4, 2010
1 parent af5ab27 commit e1b004c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
6 changes: 0 additions & 6 deletions include/linux/delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ extern unsigned long lpj_fine;
void calibrate_delay(void);
void msleep(unsigned int msecs);
unsigned long msleep_interruptible(unsigned int msecs);
void usleep_range(unsigned long min, unsigned long max);

static inline void usleep(unsigned long usecs)
{
usleep_range(usecs, usecs);
}

static inline void ssleep(unsigned int seconds)
{
Expand Down
22 changes: 0 additions & 22 deletions kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1755,25 +1755,3 @@ unsigned long msleep_interruptible(unsigned int msecs)
}

EXPORT_SYMBOL(msleep_interruptible);

static int __sched do_usleep_range(unsigned long min, unsigned long max)
{
ktime_t kmin;
unsigned long delta;

kmin = ktime_set(0, min * NSEC_PER_USEC);
delta = max - min;
return schedule_hrtimeout_range(&kmin, delta, HRTIMER_MODE_REL);
}

/**
* usleep_range - Drop in replacement for udelay where wakeup is flexible
* @min: Minimum time in usecs to sleep
* @max: Maximum time in usecs to sleep
*/
void usleep_range(unsigned long min, unsigned long max)
{
__set_current_state(TASK_UNINTERRUPTIBLE);
do_usleep_range(min, max);
}
EXPORT_SYMBOL(usleep_range);

0 comments on commit e1b004c

Please sign in to comment.