diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 14:59:47 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 14:59:47 +0000 |
commit | 5cb2faa6ede7ada9cb2bffc832c4ce60f53d6834 (patch) | |
tree | 7b72b66081d042a41dc822575503133364857ce2 /drivers/rtc/rtc-vr41xx.c | |
parent | e0ee98513d1a2e24d2ddbdecf4216bcca29d1158 (diff) | |
parent | 6060e8df517847bf445ebc61de7d4d9c7faae990 (diff) |
Merge branch 'pending-misc' (early part) into devel
Diffstat (limited to 'drivers/rtc/rtc-vr41xx.c')
-rw-r--r-- | drivers/rtc/rtc-vr41xx.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index 2c839d0d21b..fadddac1e5a 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c @@ -209,19 +209,18 @@ static int vr41xx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) static int vr41xx_rtc_irq_set_freq(struct device *dev, int freq) { - unsigned long count; + u64 count; if (!is_power_of_2(freq)) return -EINVAL; count = RTC_FREQUENCY; do_div(count, freq); - periodic_count = count; - spin_lock_irq(&rtc_lock); - rtc1_write(RTCL1LREG, count); - rtc1_write(RTCL1HREG, count >> 16); + periodic_count = count; + rtc1_write(RTCL1LREG, periodic_count); + rtc1_write(RTCL1HREG, periodic_count >> 16); spin_unlock_irq(&rtc_lock); |