aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/mmtimer.c5
-rw-r--r--include/linux/posix-timers.h1
-rw-r--r--kernel/posix-timers.c2
3 files changed, 2 insertions, 6 deletions
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
index 141ffaeb976c..ff41eb3eec92 100644
--- a/drivers/char/mmtimer.c
+++ b/drivers/char/mmtimer.c
@@ -768,12 +768,11 @@ static int sgi_timer_set(struct k_itimer *timr, int flags,
768static int sgi_clock_getres(const clockid_t which_clock, struct timespec *tp) 768static int sgi_clock_getres(const clockid_t which_clock, struct timespec *tp)
769{ 769{
770 tp->tv_sec = 0; 770 tp->tv_sec = 0;
771 tp->tv_nsec = sgi_clock.res; 771 tp->tv_nsec = sgi_clock_period;
772 return 0; 772 return 0;
773} 773}
774 774
775static struct k_clock sgi_clock = { 775static struct k_clock sgi_clock = {
776 .res = 0,
777 .clock_set = sgi_clock_set, 776 .clock_set = sgi_clock_set,
778 .clock_get = sgi_clock_get, 777 .clock_get = sgi_clock_get,
779 .clock_getres = sgi_clock_getres, 778 .clock_getres = sgi_clock_getres,
@@ -840,7 +839,7 @@ static int __init mmtimer_init(void)
840 (unsigned long) node); 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 register_posix_clock(CLOCK_SGI_CYCLE, &sgi_clock); 843 register_posix_clock(CLOCK_SGI_CYCLE, &sgi_clock);
845 844
846 printk(KERN_INFO "%s: v%s, %ld MHz\n", MMTIMER_DESC, MMTIMER_VERSION, 845 printk(KERN_INFO "%s: v%s, %ld MHz\n", MMTIMER_DESC, MMTIMER_VERSION,
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index 4aaf0c5c7cea..ef574d177fb6 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -67,7 +67,6 @@ struct k_itimer {
67}; 67};
68 68
69struct k_clock { 69struct k_clock {
70 int res; /* in nanoseconds */
71 int (*clock_getres) (const clockid_t which_clock, struct timespec *tp); 70 int (*clock_getres) (const clockid_t which_clock, struct timespec *tp);
72 int (*clock_set) (const clockid_t which_clock, 71 int (*clock_set) (const clockid_t which_clock,
73 const struct timespec *tp); 72 const struct timespec *tp);
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 748497fffd0f..f9142a99b5cb 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -204,8 +204,6 @@ static inline int invalid_clockid(const clockid_t which_clock)
204 return 1; 204 return 1;
205 if (posix_clocks[which_clock].clock_getres != NULL) 205 if (posix_clocks[which_clock].clock_getres != NULL)
206 return 0; 206 return 0;
207 if (posix_clocks[which_clock].res != 0)
208 return 0;
209 return 1; 207 return 1;
210} 208}
211 209