]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/rtc.c
Merge commit 'v2.6.26' into bkl-removal
[linux-2.6-omap-h63xx.git] / drivers / char / rtc.c
index 10f06a6bfeb5a6b177ba8b4380b9894532e88744..fa92a8af5a5a05fe62a98aadd327177006f52c16 100644 (file)
@@ -679,12 +679,13 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel)
                if (arg != (1<<tmp))
                        return -EINVAL;
 
+               rtc_freq = arg;
+
                spin_lock_irqsave(&rtc_lock, flags);
                if (hpet_set_periodic_freq(arg)) {
                        spin_unlock_irqrestore(&rtc_lock, flags);
                        return 0;
                }
-               rtc_freq = arg;
 
                val = CMOS_READ(RTC_FREQ_SELECT) & 0xf0;
                val |= (16 - tmp);