mirror of https://gitee.com/openkylin/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 <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>
This commit is contained in:
parent
f2e2b06fef
commit
61b65a394c
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue