rtc-vr41xx: fix do_div() warning

drivers/rtc/rtc-vr41xx.c: In function 'vr41xx_rtc_irq_set_freq':
drivers/rtc/rtc-vr41xx.c:217: warning: comparison of distinct pointer types lacks a cast
drivers/rtc/rtc-vr41xx.c:217: warning: right shift count >= width of type
drivers/rtc/rtc-vr41xx.c:217: warning: passing argument 1 of '__div64_32' from incompatible pointer type
include/asm-generic/div64.h:35: note: expected 'uint64_t *' but argument is of type 'long unsigned int *'

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Yoichi Yuasa and committed by Linus Torvalds 61df3337 fc63cf23

+4 -5
+4 -5
drivers/rtc/rtc-vr41xx.c
··· 209 209 210 210 static int vr41xx_rtc_irq_set_freq(struct device *dev, int freq) 211 211 { 212 - unsigned long count; 212 + u64 count; 213 213 214 214 if (!is_power_of_2(freq)) 215 215 return -EINVAL; 216 216 count = RTC_FREQUENCY; 217 217 do_div(count, freq); 218 218 219 - periodic_count = count; 220 - 221 219 spin_lock_irq(&rtc_lock); 222 220 223 - rtc1_write(RTCL1LREG, count); 224 - rtc1_write(RTCL1HREG, count >> 16); 221 + periodic_count = count; 222 + rtc1_write(RTCL1LREG, periodic_count); 223 + rtc1_write(RTCL1HREG, periodic_count >> 16); 225 224 226 225 spin_unlock_irq(&rtc_lock); 227 226