diff options
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r-- | drivers/tty/tty_io.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 6556f7452ba..4f1fc81112e 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -94,6 +94,7 @@ #include <linux/delay.h> #include <linux/seq_file.h> #include <linux/serial.h> +#include <linux/ratelimit.h> #include <linux/uaccess.h> #include <asm/system.h> @@ -1294,8 +1295,7 @@ static int tty_driver_install_tty(struct tty_driver *driver, * * Locking: tty_mutex for now */ -static void tty_driver_remove_tty(struct tty_driver *driver, - struct tty_struct *tty) +void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *tty) { if (driver->ops->remove) driver->ops->remove(driver, tty); @@ -1420,8 +1420,7 @@ err_module_put: /* call the tty release_tty routine to clean out this slot */ err_release_tty: - if (printk_ratelimit()) - printk(KERN_INFO "tty_init_dev: ldisc open failed, " + printk_ratelimited(KERN_INFO "tty_init_dev: ldisc open failed, " "clearing slot %d\n", idx); release_tty(tty, idx); return ERR_PTR(retval); |