aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/mmtimer.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-01 13:51:56 +0000
committerThomas Gleixner <tglx@linutronix.de>2011-02-02 15:28:15 +0100
commitebaac757acae0431e2c79c00e09f1debdabbddd7 (patch)
tree3f5dbd5cdb4cd6effd1556e65b4885edc8e269de /drivers/char/mmtimer.c
parente5e542eea9075dd008993c2ee80b2cc9f31fc494 (diff)
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>
Diffstat (limited to 'drivers/char/mmtimer.c')
-rw-r--r--drivers/char/mmtimer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
index 141ffaeb976..ff41eb3eec9 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,
static int sgi_clock_getres(const clockid_t which_clock, struct timespec *tp)
{
tp->tv_sec = 0;
- tp->tv_nsec = sgi_clock.res;
+ tp->tv_nsec = sgi_clock_period;
return 0;
}
static struct k_clock sgi_clock = {
- .res = 0,
.clock_set = sgi_clock_set,
.clock_get = sgi_clock_get,
.clock_getres = sgi_clock_getres,
@@ -840,7 +839,7 @@ static int __init mmtimer_init(void)
(unsigned long) node);
}
- sgi_clock_period = sgi_clock.res = NSEC_PER_SEC / sn_rtc_cycles_per_second;
+ sgi_clock_period = NSEC_PER_SEC / sn_rtc_cycles_per_second;
register_posix_clock(CLOCK_SGI_CYCLE, &sgi_clock);
printk(KERN_INFO "%s: v%s, %ld MHz\n", MMTIMER_DESC, MMTIMER_VERSION,