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

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

parent 9d76559d
...@@ -1528,7 +1528,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) ...@@ -1528,7 +1528,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
if (tty_hung_up_p(filp)) { if (tty_hung_up_p(filp)) {
DBG_CNT("before DEC-hung"); DBG_CNT("before DEC-hung");
MOD_DEC_USE_COUNT;
local_irq_restore(flags); local_irq_restore(flags);
return; return;
} }
...@@ -1555,7 +1554,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) ...@@ -1555,7 +1554,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
} }
if (state->count) { if (state->count) {
DBG_CNT("before DEC-2"); DBG_CNT("before DEC-2");
MOD_DEC_USE_COUNT;
local_irq_restore(flags); local_irq_restore(flags);
return; return;
} }
...@@ -1615,7 +1613,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) ...@@ -1615,7 +1613,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE| info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE|
ASYNC_CLOSING); ASYNC_CLOSING);
wake_up_interruptible(&info->close_wait); wake_up_interruptible(&info->close_wait);
MOD_DEC_USE_COUNT;
local_irq_restore(flags); local_irq_restore(flags);
} }
...@@ -1894,15 +1891,12 @@ static int rs_open(struct tty_struct *tty, struct file * filp) ...@@ -1894,15 +1891,12 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
int retval, line; int retval, line;
unsigned long page; unsigned long page;
MOD_INC_USE_COUNT;
line = tty->index; line = tty->index;
if ((line < 0) || (line >= NR_PORTS)) { if ((line < 0) || (line >= NR_PORTS)) {
MOD_DEC_USE_COUNT;
return -ENODEV; return -ENODEV;
} }
retval = get_async_struct(line, &info); retval = get_async_struct(line, &info);
if (retval) { if (retval) {
MOD_DEC_USE_COUNT;
return retval; return retval;
} }
tty->driver_data = info; tty->driver_data = info;
...@@ -2116,6 +2110,7 @@ static int __init rs_init(void) ...@@ -2116,6 +2110,7 @@ static int __init rs_init(void)
memset(&serial_driver, 0, sizeof(struct tty_driver)); memset(&serial_driver, 0, sizeof(struct tty_driver));
serial_driver.magic = TTY_DRIVER_MAGIC; serial_driver.magic = TTY_DRIVER_MAGIC;
serial_driver.owner = THIS_MODULE;
serial_driver.driver_name = "amiserial"; serial_driver.driver_name = "amiserial";
serial_driver.name = "ttyS"; serial_driver.name = "ttyS";
serial_driver.major = TTY_MAJOR; serial_driver.major = TTY_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