Commit 83d24f82 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman

staging: dgap: remove useless variable

dgap_major_serial_registered and dgap_major_transparent_print_registered
could be checked whether a board is initialized.
But it doesn't need to check that variables becasue dgap module
isn't calling the dgap_cleanup_tty() without initializing
for a board completely.
Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 99a643b8
......@@ -1320,11 +1320,9 @@ static int dgap_tty_register(struct board_t *brd)
if (rc < 0)
goto unregister_serial_drv;
brd->dgap_major_serial_registered = TRUE;
dgap_boards_by_major[brd->serial_driver->major] = brd;
brd->dgap_serial_major = brd->serial_driver->major;
brd->dgap_major_transparent_print_registered = TRUE;
dgap_boards_by_major[brd->print_driver->major] = brd;
brd->dgap_transparent_print_major = brd->print_driver->major;
......@@ -1544,7 +1542,6 @@ static void dgap_cleanup_tty(struct board_t *brd)
struct device *dev;
int i;
if (brd->dgap_major_serial_registered) {
dgap_boards_by_major[brd->serial_driver->major] = NULL;
brd->dgap_serial_major = 0;
for (i = 0; i < brd->nasync; i++) {
......@@ -1556,10 +1553,7 @@ static void dgap_cleanup_tty(struct board_t *brd)
tty_unregister_driver(brd->serial_driver);
put_tty_driver(brd->serial_driver);
kfree(brd->serial_ports);
brd->dgap_major_serial_registered = FALSE;
}
if (brd->dgap_major_transparent_print_registered) {
dgap_boards_by_major[brd->print_driver->major] = NULL;
brd->dgap_transparent_print_major = 0;
for (i = 0; i < brd->nasync; i++) {
......@@ -1571,8 +1565,6 @@ static void dgap_cleanup_tty(struct board_t *brd)
tty_unregister_driver(brd->print_driver);
put_tty_driver(brd->print_driver);
kfree(brd->printer_ports);
brd->dgap_major_transparent_print_registered = FALSE;
}
}
/*=======================================================================
......
......@@ -586,9 +586,6 @@ struct board_t {
struct tty_port *printer_ports;
char print_name[200];
u32 dgap_major_serial_registered;
u32 dgap_major_transparent_print_registered;
u32 dgap_serial_major;
u32 dgap_transparent_print_major;
......
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