diff options
author | Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de> | 2011-06-16 08:07:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-01 18:35:45 -0400 |
commit | 5a3c6b251d587715f8b87a50216e4c085c655777 (patch) | |
tree | fa1d3379b02b0bb243c367d30f84321dd1dc486d /drivers/tty | |
parent | 6ab8fba7fcb012a42d686abd33555b2215071415 (diff) |
drivers/tty: use printk_ratelimited() instead of printk_ratelimit()
Since the printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/moxa.c | 5 | ||||
-rw-r--r-- | drivers/tty/mxser.c | 4 | ||||
-rw-r--r-- | drivers/tty/tty_io.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index ba679ce0a774..d15a071b1a54 100644 --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/bitops.h> | 45 | #include <linux/bitops.h> |
46 | #include <linux/slab.h> | 46 | #include <linux/slab.h> |
47 | #include <linux/ratelimit.h> | ||
47 | 48 | ||
48 | #include <asm/system.h> | 49 | #include <asm/system.h> |
49 | #include <asm/io.h> | 50 | #include <asm/io.h> |
@@ -242,8 +243,8 @@ static void moxa_wait_finish(void __iomem *ofsAddr) | |||
242 | while (readw(ofsAddr + FuncCode) != 0) | 243 | while (readw(ofsAddr + FuncCode) != 0) |
243 | if (time_after(jiffies, end)) | 244 | if (time_after(jiffies, end)) |
244 | return; | 245 | return; |
245 | if (readw(ofsAddr + FuncCode) != 0 && printk_ratelimit()) | 246 | if (readw(ofsAddr + FuncCode) != 0) |
246 | printk(KERN_WARNING "moxa function expired\n"); | 247 | printk_ratelimited(KERN_WARNING "moxa function expired\n"); |
247 | } | 248 | } |
248 | 249 | ||
249 | static void moxafunc(void __iomem *ofsAddr, u16 cmd, u16 arg) | 250 | static void moxafunc(void __iomem *ofsAddr, u16 cmd, u16 arg) |
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index d188f378684d..7fc8c02fea6c 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/pci.h> | 39 | #include <linux/pci.h> |
40 | #include <linux/bitops.h> | 40 | #include <linux/bitops.h> |
41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
42 | #include <linux/ratelimit.h> | ||
42 | 43 | ||
43 | #include <asm/system.h> | 44 | #include <asm/system.h> |
44 | #include <asm/io.h> | 45 | #include <asm/io.h> |
@@ -1490,8 +1491,7 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp) | |||
1490 | 1491 | ||
1491 | switch (cmd) { | 1492 | switch (cmd) { |
1492 | case MOXA_GET_MAJOR: | 1493 | case MOXA_GET_MAJOR: |
1493 | if (printk_ratelimit()) | 1494 | printk_ratelimited(KERN_WARNING "mxser: '%s' uses deprecated ioctl " |
1494 | printk(KERN_WARNING "mxser: '%s' uses deprecated ioctl " | ||
1495 | "%x (GET_MAJOR), fix your userspace\n", | 1495 | "%x (GET_MAJOR), fix your userspace\n", |
1496 | current->comm, cmd); | 1496 | current->comm, cmd); |
1497 | return put_user(ttymajor, (int __user *)argp); | 1497 | return put_user(ttymajor, (int __user *)argp); |
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 6556f7452ba6..150e4f747c7d 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
@@ -94,6 +94,7 @@ | |||
94 | #include <linux/delay.h> | 94 | #include <linux/delay.h> |
95 | #include <linux/seq_file.h> | 95 | #include <linux/seq_file.h> |
96 | #include <linux/serial.h> | 96 | #include <linux/serial.h> |
97 | #include <linux/ratelimit.h> | ||
97 | 98 | ||
98 | #include <linux/uaccess.h> | 99 | #include <linux/uaccess.h> |
99 | #include <asm/system.h> | 100 | #include <asm/system.h> |
@@ -1420,8 +1421,7 @@ err_module_put: | |||
1420 | 1421 | ||
1421 | /* call the tty release_tty routine to clean out this slot */ | 1422 | /* call the tty release_tty routine to clean out this slot */ |
1422 | err_release_tty: | 1423 | err_release_tty: |
1423 | if (printk_ratelimit()) | 1424 | printk_ratelimited(KERN_INFO "tty_init_dev: ldisc open failed, " |
1424 | printk(KERN_INFO "tty_init_dev: ldisc open failed, " | ||
1425 | "clearing slot %d\n", idx); | 1425 | "clearing slot %d\n", idx); |
1426 | release_tty(tty, idx); | 1426 | release_tty(tty, idx); |
1427 | return ERR_PTR(retval); | 1427 | return ERR_PTR(retval); |