Commit 61b65a39 authored by Phong Tran's avatar Phong Tran Committed by Greg Kroah-Hartman

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: default avatarPhong Tran <tranmanphong@gmail.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent f2e2b06f
......@@ -732,12 +732,8 @@ static int gb_tty_init(void)
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 = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment