aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/moxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/moxa.c')
-rw-r--r--drivers/tty/moxa.c5
1 files changed, 3 insertions, 2 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
249static void moxafunc(void __iomem *ofsAddr, u16 cmd, u16 arg) 250static void moxafunc(void __iomem *ofsAddr, u16 cmd, u16 arg)