Skip to content

Commit

Permalink
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/sc…
Browse files Browse the repository at this point in the history
…m/linux/kernel/git/tip/tip

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  alarmtimers: Fix time comparison
  ptp: Fix clock_getres() implementation
  • Loading branch information
Linus Torvalds committed Dec 8, 2011
2 parents fb38f9b + c9c024b commit 09d9673
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion drivers/ptp/ptp_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ static s32 scaled_ppm_to_ppb(long ppm)

static int ptp_clock_getres(struct posix_clock *pc, struct timespec *tp)
{
return 1; /* always round timer functions to one nanosecond */
tp->tv_sec = 0;
tp->tv_nsec = 1;
return 0;
}

static int ptp_clock_settime(struct posix_clock *pc, const struct timespec *tp)
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/alarmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static enum hrtimer_restart alarmtimer_fired(struct hrtimer *timer)
struct alarm *alarm;
ktime_t expired = next->expires;

if (expired.tv64 >= now.tv64)
if (expired.tv64 > now.tv64)
break;

alarm = container_of(next, struct alarm, node);
Expand Down

0 comments on commit 09d9673

Please sign in to comment.