diff options
Diffstat (limited to 'drivers/char/rtc.c')
-rw-r--r-- | drivers/char/rtc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 10f06a6bfeb5..fa92a8af5a5a 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
@@ -679,12 +679,13 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel) | |||
679 | if (arg != (1<<tmp)) | 679 | if (arg != (1<<tmp)) |
680 | return -EINVAL; | 680 | return -EINVAL; |
681 | 681 | ||
682 | rtc_freq = arg; | ||
683 | |||
682 | spin_lock_irqsave(&rtc_lock, flags); | 684 | spin_lock_irqsave(&rtc_lock, flags); |
683 | if (hpet_set_periodic_freq(arg)) { | 685 | if (hpet_set_periodic_freq(arg)) { |
684 | spin_unlock_irqrestore(&rtc_lock, flags); | 686 | spin_unlock_irqrestore(&rtc_lock, flags); |
685 | return 0; | 687 | return 0; |
686 | } | 688 | } |
687 | rtc_freq = arg; | ||
688 | 689 | ||
689 | val = CMOS_READ(RTC_FREQ_SELECT) & 0xf0; | 690 | val = CMOS_READ(RTC_FREQ_SELECT) & 0xf0; |
690 | val |= (16 - tmp); | 691 | val |= (16 - tmp); |