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

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

parent fda3b647
...@@ -431,8 +431,6 @@ int pcxe_open(struct tty_struct *tty, struct file * filp) ...@@ -431,8 +431,6 @@ int pcxe_open(struct tty_struct *tty, struct file * filp)
return(-ENODEV); return(-ENODEV);
} }
/* flag the kernel that there is somebody using this guy */
MOD_INC_USE_COUNT;
/* /*
* If the device is in the middle of being closed, then block * If the device is in the middle of being closed, then block
* until it's done, and then try again. * until it's done, and then try again.
...@@ -576,7 +574,6 @@ static void pcxe_close(struct tty_struct * tty, struct file * filp) ...@@ -576,7 +574,6 @@ static void pcxe_close(struct tty_struct * tty, struct file * filp)
if(tty_hung_up_p(filp)) { if(tty_hung_up_p(filp)) {
/* flag that somebody is done with this module */ /* flag that somebody is done with this module */
MOD_DEC_USE_COUNT;
restore_flags(flags); restore_flags(flags);
return; return;
} }
...@@ -594,7 +591,6 @@ static void pcxe_close(struct tty_struct * tty, struct file * filp) ...@@ -594,7 +591,6 @@ static void pcxe_close(struct tty_struct * tty, struct file * filp)
} }
if (info->count-- > 1) { if (info->count-- > 1) {
restore_flags(flags); restore_flags(flags);
MOD_DEC_USE_COUNT;
return; return;
} }
if (info->count < 0) { if (info->count < 0) {
...@@ -651,7 +647,6 @@ static void pcxe_close(struct tty_struct * tty, struct file * filp) ...@@ -651,7 +647,6 @@ static void pcxe_close(struct tty_struct * tty, struct file * filp)
info->asyncflags &= ~(ASYNC_NORMAL_ACTIVE| info->asyncflags &= ~(ASYNC_NORMAL_ACTIVE|
ASYNC_CALLOUT_ACTIVE|ASYNC_CLOSING); ASYNC_CALLOUT_ACTIVE|ASYNC_CLOSING);
wake_up_interruptible(&info->close_wait); wake_up_interruptible(&info->close_wait);
MOD_DEC_USE_COUNT;
restore_flags(flags); restore_flags(flags);
} }
} }
...@@ -1228,6 +1223,7 @@ int __init pcxe_init(void) ...@@ -1228,6 +1223,7 @@ int __init pcxe_init(void)
memset(&pcxe_driver, 0, sizeof(struct tty_driver)); memset(&pcxe_driver, 0, sizeof(struct tty_driver));
pcxe_driver.magic = TTY_DRIVER_MAGIC; pcxe_driver.magic = TTY_DRIVER_MAGIC;
pcxe_driver.owner = THIS_MODULE;
pcxe_driver.name = "ttyD"; pcxe_driver.name = "ttyD";
pcxe_driver.major = DIGI_MAJOR; pcxe_driver.major = DIGI_MAJOR;
pcxe_driver.minor_start = 0; pcxe_driver.minor_start = 0;
......
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