]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IRDA]: Ratelimit messages.
authorJoe Perches <joe@perches.com>
Mon, 13 Feb 2006 23:34:11 +0000 (15:34 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2006 23:34:11 +0000 (15:34 -0800)
From: Joe Perches <joe@perches.com>

Based upon a patch by Dave Jones.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/irda/irda.h

index 05a840837fe7b48ddf375bffecab74f1ba6d6e8e..1880e46ecc9b0774de64e867f4f4cb7e8388eff6 100644 (file)
@@ -82,9 +82,9 @@ do { if(!(expr)) { \
 #define IRDA_ASSERT_LABEL(label)
 #endif /* CONFIG_IRDA_DEBUG */
 
-#define IRDA_WARNING(args...) printk(KERN_WARNING args)
-#define IRDA_MESSAGE(args...) printk(KERN_INFO args)
-#define IRDA_ERROR(args...)   printk(KERN_ERR args)
+#define IRDA_WARNING(args...) do { if (net_ratelimit()) printk(KERN_WARNING args); } while (0)
+#define IRDA_MESSAGE(args...) do { if (net_ratelimit()) printk(KERN_INFO args); } while (0)
+#define IRDA_ERROR(args...)   do { if (net_ratelimit()) printk(KERN_ERR args); } while (0)
 
 /*
  *  Magic numbers used by Linux-IrDA. Random numbers which must be unique to