From: Phong Tran Date: Tue, 9 Jun 2015 13:28:18 +0000 (+0700) Subject: greybus: uart: remove the redundant unregister chrdev X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1486 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=61b65a394cdbf5ed9117ad0da184a3f90a9b914a;p=karo-tx-linux.git greybus: uart: remove the redundant unregister chrdev The unregister_chrdev_region() does twice here. The chrdev region was unregistered inside tty_unregister_driver(). Signed-off-by: Phong Tran Reviewed-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index 6db49930cf40..7e94632a581b 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -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 = {