drivers/char/rtc: use printk_ratelimited instead of printk_ratelimit
authorChristian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
Sat, 4 Jun 2011 15:36:33 +0000 (17:36 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 15 Sep 2011 12:05:25 +0000 (14:05 +0200)
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited.

Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/char/rtc.c

index dfa8b3062fdad831485c7c8ee1f36839b6377a2f..ccd124ab7ca7c54d3b6ae2cc947d01261954cd1d 100644 (file)
@@ -80,6 +80,7 @@
 #include <linux/bcd.h>
 #include <linux/delay.h>
 #include <linux/uaccess.h>
+#include <linux/ratelimit.h>
 
 #include <asm/current.h>
 #include <asm/system.h>
@@ -1195,10 +1196,8 @@ static void rtc_dropped_irq(unsigned long data)
 
        spin_unlock_irq(&rtc_lock);
 
-       if (printk_ratelimit()) {
-               printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n",
-                       freq);
-       }
+       printk_ratelimited(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n",
+                          freq);
 
        /* Now we have new data */
        wake_up_interruptible(&rtc_wait);