]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: uart: remove the redundant unregister chrdev
authorPhong Tran <tranmanphong@gmail.com>
Tue, 9 Jun 2015 13:28:18 +0000 (20:28 +0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 9 Jun 2015 20:35:47 +0000 (13:35 -0700)
The unregister_chrdev_region() does twice here.
The chrdev region was unregistered
inside tty_unregister_driver().

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/uart.c

index 6db49930cf40018dd492e04ebd2d9bcde89c486f..7e94632a581b279eb269f3afaaed5d21d0d7aae9 100644 (file)
@@ -732,12 +732,8 @@ fail_unregister_dev:
 
 static void gb_tty_exit(void)
 {
-       int major = MAJOR(gb_tty_driver->major);
-       int minor = gb_tty_driver->minor_start;
-
        tty_unregister_driver(gb_tty_driver);
        put_tty_driver(gb_tty_driver);
-       unregister_chrdev_region(MKDEV(major, minor), GB_NUM_MINORS);
 }
 
 static struct gb_protocol uart_protocol = {