diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-12-05 15:16:06 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-21 15:57:36 -0500 |
commit | 5b4993336fe6b14627ab85efde17aea094d333e8 (patch) | |
tree | d5b18112a9ce5c689428d3bdcf6134d1520d7197 /drivers/ptp | |
parent | b492a377ac1507a67091c5232afd5ebd1c7c6e25 (diff) |
ptp: Fix clock_getres() implementation
commit d68fb11c3dae75c8331538dcf083a65e697cc034 upstream.
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: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/ptp')
-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) | |||
101 | 101 | ||
102 | static int ptp_clock_getres(struct posix_clock *pc, struct timespec *tp) | 102 | static int ptp_clock_getres(struct posix_clock *pc, struct timespec *tp) |
103 | { | 103 | { |
104 | return 1; /* always round timer functions to one nanosecond */ | 104 | tp->tv_sec = 0; |
105 | tp->tv_nsec = 1; | ||
106 | return 0; | ||
105 | } | 107 | } |
106 | 108 | ||
107 | static int ptp_clock_settime(struct posix_clock *pc, const struct timespec *tp) | 109 | static int ptp_clock_settime(struct posix_clock *pc, const struct timespec *tp) |