X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc64%2Fkernel%2Frtc.c;h=f941278bd01ce0f6b13e07dbebdd2c1484a09d8c;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=536a4991836403acc98f4c3838875f4e15ff5fb5;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c index 536a49918..f941278bd 100644 --- a/arch/ppc64/kernel/rtc.c +++ b/arch/ppc64/kernel/rtc.c @@ -185,11 +185,10 @@ static struct file_operations rtc_fops = { .release = rtc_release, }; -static struct miscdevice rtc_dev= -{ - RTC_MINOR, - "rtc", - &rtc_fops +static struct miscdevice rtc_dev = { + .minor = RTC_MINOR, + .name = "rtc", + .fops = &rtc_fops }; static int __init rtc_init(void) @@ -201,9 +200,11 @@ static int __init rtc_init(void) return retval; #ifdef CONFIG_PROC_FS - if (create_proc_read_entry ("driver/rtc", 0, NULL, rtc_read_proc, NULL) == NULL) + if (create_proc_read_entry("driver/rtc", 0, NULL, rtc_read_proc, NULL) + == NULL) { misc_deregister(&rtc_dev); return -ENOMEM; + } #endif printk(KERN_INFO "i/pSeries Real Time Clock Driver v" RTC_VERSION "\n"); @@ -275,7 +276,7 @@ void iSeries_get_rtc_time(struct rtc_time *rtc_tm) if (piranha_simulator) return; - mf_getRtc(rtc_tm); + mf_get_rtc(rtc_tm); rtc_tm->tm_mon--; } @@ -285,7 +286,7 @@ void iSeries_get_rtc_time(struct rtc_time *rtc_tm) */ int iSeries_set_rtc_time(struct rtc_time *tm) { - mf_setRtc(tm); + mf_set_rtc(tm); return 0; } @@ -356,7 +357,7 @@ void pSeries_get_boot_time(struct rtc_time *rtc_tm) } } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); - if (error != 0) { + if (error != 0 && printk_ratelimit()) { printk(KERN_WARNING "error: reading the clock failed (%d)\n", error); return; @@ -384,7 +385,7 @@ void pSeries_get_rtc_time(struct rtc_time *rtc_tm) do { error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret); if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) { - if (in_interrupt()) { + if (in_interrupt() && printk_ratelimit()) { printk(KERN_WARNING "error: reading clock would delay interrupt\n"); return; /* delay not allowed */ } @@ -395,7 +396,7 @@ void pSeries_get_rtc_time(struct rtc_time *rtc_tm) } } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); - if (error != 0) { + if (error != 0 && printk_ratelimit()) { printk(KERN_WARNING "error: reading the clock failed (%d)\n", error); return; @@ -430,7 +431,7 @@ int pSeries_set_rtc_time(struct rtc_time *tm) } } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); - if (error != 0) + if (error != 0 && printk_ratelimit()) printk(KERN_WARNING "error: setting the clock failed (%d)\n", error);