[PATCH] rate limiting for the ldisc open failure messages
[linux-2.6-block.git] / drivers / char / tty_io.c
index 63543731977846822c1270d36b0c3ca5547f52f7..333741770f1e079f2fbe0df98b69699a4194f924 100644 (file)
@@ -2065,8 +2065,9 @@ fail_no_mem:
 
        /* call the tty release_mem routine to clean out this slot */
 release_mem_out:
-       printk(KERN_INFO "init_dev: ldisc open failed, "
-                        "clearing slot %d\n", idx);
+       if (printk_ratelimit())
+               printk(KERN_INFO "init_dev: ldisc open failed, "
+                                "clearing slot %d\n", idx);
        release_mem(tty, idx);
        goto end_init;
 }