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

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

parent 51442d5a
...@@ -793,6 +793,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) ...@@ -793,6 +793,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
/* Initialise the relevant fields. */ /* Initialise the relevant fields. */
ip2_tty_driver.magic = TTY_DRIVER_MAGIC; ip2_tty_driver.magic = TTY_DRIVER_MAGIC;
ip2_tty_driver.owner = THIS_MODULE;
ip2_tty_driver.name = pcTty; ip2_tty_driver.name = pcTty;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,0) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,0)
ip2_tty_driver.driver_name = pcDriver_name; ip2_tty_driver.driver_name = pcDriver_name;
...@@ -1577,7 +1578,6 @@ ip2_open( PTTY tty, struct file *pFile ) ...@@ -1577,7 +1578,6 @@ ip2_open( PTTY tty, struct file *pFile )
/* Setup pointer links in device and tty structures */ /* Setup pointer links in device and tty structures */
pCh->pTTY = tty; pCh->pTTY = tty;
tty->driver_data = pCh; tty->driver_data = pCh;
MOD_INC_USE_COUNT;
#ifdef IP2DEBUG_OPEN #ifdef IP2DEBUG_OPEN
printk(KERN_DEBUG \ printk(KERN_DEBUG \
...@@ -1777,14 +1777,12 @@ ip2_close( PTTY tty, struct file *pFile ) ...@@ -1777,14 +1777,12 @@ ip2_close( PTTY tty, struct file *pFile )
#endif #endif
if ( tty_hung_up_p ( pFile ) ) { if ( tty_hung_up_p ( pFile ) ) {
MOD_DEC_USE_COUNT;
ip2trace (CHANN, ITRC_CLOSE, 2, 1, 2 ); ip2trace (CHANN, ITRC_CLOSE, 2, 1, 2 );
return; return;
} }
if ( tty->count > 1 ) { /* not the last close */ if ( tty->count > 1 ) { /* not the last close */
MOD_DEC_USE_COUNT;
ip2trace (CHANN, ITRC_CLOSE, 2, 1, 3 ); ip2trace (CHANN, ITRC_CLOSE, 2, 1, 3 );
...@@ -1852,7 +1850,6 @@ ip2_close( PTTY tty, struct file *pFile ) ...@@ -1852,7 +1850,6 @@ ip2_close( PTTY tty, struct file *pFile )
DBG_CNT("ip2_close: after wakeups--"); DBG_CNT("ip2_close: after wakeups--");
#endif #endif
MOD_DEC_USE_COUNT;
ip2trace (CHANN, ITRC_CLOSE, ITRC_RETURN, 1, 1 ); ip2trace (CHANN, ITRC_CLOSE, ITRC_RETURN, 1, 1 );
......
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