aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/tty_io.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 5d405a1bfbe3..7710a6a77d97 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3770,7 +3770,9 @@ int tty_register_driver(struct tty_driver *driver)
3770 if (!driver->put_char) 3770 if (!driver->put_char)
3771 driver->put_char = tty_default_put_char; 3771 driver->put_char = tty_default_put_char;
3772 3772
3773 mutex_lock(&tty_mutex);
3773 list_add(&driver->tty_drivers, &tty_drivers); 3774 list_add(&driver->tty_drivers, &tty_drivers);
3775 mutex_unlock(&tty_mutex);
3774 3776
3775 if ( !(driver->flags & TTY_DRIVER_DYNAMIC_DEV) ) { 3777 if ( !(driver->flags & TTY_DRIVER_DYNAMIC_DEV) ) {
3776 for(i = 0; i < driver->num; i++) 3778 for(i = 0; i < driver->num; i++)
@@ -3796,8 +3798,9 @@ int tty_unregister_driver(struct tty_driver *driver)
3796 3798
3797 unregister_chrdev_region(MKDEV(driver->major, driver->minor_start), 3799 unregister_chrdev_region(MKDEV(driver->major, driver->minor_start),
3798 driver->num); 3800 driver->num);
3799 3801 mutex_lock(&tty_mutex);
3800 list_del(&driver->tty_drivers); 3802 list_del(&driver->tty_drivers);
3803 mutex_unlock(&tty_mutex);
3801 3804
3802 /* 3805 /*
3803 * Free the termios and termios_locked structures because 3806 * Free the termios and termios_locked structures because