diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-12-05 21:16:06 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-12-06 11:38:32 +0100 |
commit | d68fb11c3dae75c8331538dcf083a65e697cc034 (patch) | |
tree | 58e17fb372e78aac7bec64cff201379094c75ff4 /drivers/ptp/ptp_clock.c | |
parent | 45e713efe2fa574b6662e7fb63fae9497c5e03d4 (diff) |
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>
Diffstat (limited to 'drivers/ptp/ptp_clock.c')
-rw-r--r-- | drivers/ptp/ptp_clock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c index cf3f9997546..10451a15e82 100644 --- a/drivers/ptp/ptp_clock.c +++ b/drivers/ptp/ptp_clock.c @@ -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) |