Commit d13226b5 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Greg Kroah-Hartman

ptp: Fix clock_getres() implementation

commit d68fb11c upstream.

The clock_getres() function must return the resolution in the timespec
argument and return 0 for success.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarJohn Stultz <john.stultz@linaro.org>
Cc: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f767f25e
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment