Commit 129738d3 authored by Hanna V. Linder's avatar Hanna V. Linder Committed by Greg Kroah-Hartman

[PATCH] specialix tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT

parent 5a7ee7c0
...@@ -833,9 +833,7 @@ static inline void sx_check_modem(struct specialix_board * bp) ...@@ -833,9 +833,7 @@ static inline void sx_check_modem(struct specialix_board * bp)
#ifdef SPECIALIX_DEBUG #ifdef SPECIALIX_DEBUG
printk ( "Sending HUP.\n"); printk ( "Sending HUP.\n");
#endif #endif
MOD_INC_USE_COUNT; schedule_task(&port->tqueue_hangup);
if (schedule_task(&port->tqueue_hangup) == 0)
MOD_DEC_USE_COUNT;
} else { } else {
#ifdef SPECIALIX_DEBUG #ifdef SPECIALIX_DEBUG
printk ( "Don't need to send HUP.\n"); printk ( "Don't need to send HUP.\n");
...@@ -980,7 +978,6 @@ static inline int sx_setup_board(struct specialix_board * bp) ...@@ -980,7 +978,6 @@ static inline int sx_setup_board(struct specialix_board * bp)
turn_ints_on (bp); turn_ints_on (bp);
bp->flags |= SX_BOARD_ACTIVE; bp->flags |= SX_BOARD_ACTIVE;
MOD_INC_USE_COUNT;
return 0; return 0;
} }
...@@ -1000,7 +997,6 @@ static inline void sx_shutdown_board(struct specialix_board *bp) ...@@ -1000,7 +997,6 @@ static inline void sx_shutdown_board(struct specialix_board *bp)
turn_ints_off (bp); turn_ints_off (bp);
MOD_DEC_USE_COUNT;
} }
...@@ -2150,7 +2146,6 @@ static void do_sx_hangup(void *private_) ...@@ -2150,7 +2146,6 @@ static void do_sx_hangup(void *private_)
tty = port->tty; tty = port->tty;
if (tty) if (tty)
tty_hangup(tty); /* FIXME: module removal race here */ tty_hangup(tty); /* FIXME: module removal race here */
MOD_DEC_USE_COUNT;
} }
...@@ -2233,6 +2228,7 @@ static int sx_init_drivers(void) ...@@ -2233,6 +2228,7 @@ static int sx_init_drivers(void)
init_bh(SPECIALIX_BH, do_specialix_bh); init_bh(SPECIALIX_BH, do_specialix_bh);
memset(&specialix_driver, 0, sizeof(specialix_driver)); memset(&specialix_driver, 0, sizeof(specialix_driver));
specialix_driver.magic = TTY_DRIVER_MAGIC; specialix_driver.magic = TTY_DRIVER_MAGIC;
specialix_driver.owner = THIS_MODULE;
specialix_driver.name = "ttyW"; specialix_driver.name = "ttyW";
specialix_driver.major = SPECIALIX_NORMAL_MAJOR; specialix_driver.major = SPECIALIX_NORMAL_MAJOR;
specialix_driver.num = SX_NBOARD * SX_NPORT; specialix_driver.num = SX_NBOARD * SX_NPORT;
......
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