mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-29 14:55:12 +00:00
ptp: Fix clock_getres() implementation
The clock_getres() function must return the resolution in the timespec argument and return 0 for success. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <john.stultz@linaro.org> Cc: stable@kernel.org Cc: Richard Cochran <richard.cochran@omicron.at>
This commit is contained in:
parent
45e713efe2
commit
d68fb11c3d
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user