Skip to content

Commit

Permalink
drivers/char/rtc: use printk_ratelimited instead of printk_ratelimit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Dietrich authored and Jiri Kosina committed Sep 15, 2011
1 parent 5369fcc commit a28ee47
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a28ee47

Please sign in to comment.