projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45e713e
)
ptp: Fix clock_getres() implementation
author
Thomas Gleixner
<
[email protected]
>
Mon, 5 Dec 2011 20:16:06 +0000
(21:16 +0100)
committer
Thomas Gleixner
<
[email protected]
>
Tue, 6 Dec 2011 10:38:32 +0000
(11:38 +0100)
The clock_getres() function must return the resolution in the timespec
argument and return 0 for success.
Signed-off-by: Thomas Gleixner <
[email protected]
>
Acked-by: John Stultz <
[email protected]
>
Cc:
[email protected]
Cc: Richard Cochran <
[email protected]
>
drivers/ptp/ptp_clock.c
patch
|
blob
|
history
diff --git
a/drivers/ptp/ptp_clock.c
b/drivers/ptp/ptp_clock.c
index cf3f9997546dc41d10a143390e834d0926720964..10451a15e8284f33be26996363c5ffd6c79ad56a 100644
(file)
--- 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)