Commit ebaac757acae0431e2c79c00e09f1debdabbddd7
1 parent
e5e542eea9
Exists in
master
and in
7 other branches
posix-timers: Remove useless res field from k_clock
The res member of kclock is only used by mmtimer.c, but even there it contains redundant information. Remove the field and fixup mmtimer. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <johnstul@us.ibm.com> Tested-by: Richard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.808714587@linutronix.de>
Showing 3 changed files with 2 additions and 6 deletions Side-by-side Diff
drivers/char/mmtimer.c
... | ... | @@ -768,12 +768,11 @@ |
768 | 768 | static int sgi_clock_getres(const clockid_t which_clock, struct timespec *tp) |
769 | 769 | { |
770 | 770 | tp->tv_sec = 0; |
771 | - tp->tv_nsec = sgi_clock.res; | |
771 | + tp->tv_nsec = sgi_clock_period; | |
772 | 772 | return 0; |
773 | 773 | } |
774 | 774 | |
775 | 775 | static struct k_clock sgi_clock = { |
776 | - .res = 0, | |
777 | 776 | .clock_set = sgi_clock_set, |
778 | 777 | .clock_get = sgi_clock_get, |
779 | 778 | .clock_getres = sgi_clock_getres, |
... | ... | @@ -840,7 +839,7 @@ |
840 | 839 | (unsigned long) node); |
841 | 840 | } |
842 | 841 | |
843 | - sgi_clock_period = sgi_clock.res = NSEC_PER_SEC / sn_rtc_cycles_per_second; | |
842 | + sgi_clock_period = NSEC_PER_SEC / sn_rtc_cycles_per_second; | |
844 | 843 | register_posix_clock(CLOCK_SGI_CYCLE, &sgi_clock); |
845 | 844 | |
846 | 845 | printk(KERN_INFO "%s: v%s, %ld MHz\n", MMTIMER_DESC, MMTIMER_VERSION, |
include/linux/posix-timers.h