lkml.org 
[lkml]   [2003]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] TTY changes for 2.5.69
From
Date
ChangeSet 1.1103, 2003/05/07 15:00:22-07:00, hannal@us.ibm.com

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


drivers/char/istallion.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)


diff -Nru a/drivers/char/istallion.c b/drivers/char/istallion.c
--- a/drivers/char/istallion.c Wed May 7 16:00:56 2003
+++ b/drivers/char/istallion.c Wed May 7 16:00:56 2003
@@ -1054,7 +1054,6 @@
if (portp->devnr < 1)
return(-ENODEV);

- MOD_INC_USE_COUNT;

/*
* Check if this port is in the middle of closing. If so then wait
@@ -1170,14 +1169,12 @@
save_flags(flags);
cli();
if (tty_hung_up_p(filp)) {
- MOD_DEC_USE_COUNT;
restore_flags(flags);
return;
}
if ((tty->count == 1) && (portp->refcount != 1))
portp->refcount = 1;
if (portp->refcount-- > 1) {
- MOD_DEC_USE_COUNT;
restore_flags(flags);
return;
}
@@ -1232,7 +1229,6 @@
portp->flags &= ~(ASYNC_CALLOUT_ACTIVE | ASYNC_NORMAL_ACTIVE |
ASYNC_CLOSING);
wake_up_interruptible(&portp->close_wait);
- MOD_DEC_USE_COUNT;
restore_flags(flags);
}

@@ -2369,7 +2365,6 @@
tty_hangup(portp->tty);
}
}
- MOD_DEC_USE_COUNT;
}

/*****************************************************************************/
@@ -3004,9 +2999,7 @@
if (! ((portp->flags & ASYNC_CALLOUT_ACTIVE) &&
(portp->flags & ASYNC_CALLOUT_NOHUP))) {
if (tty != (struct tty_struct *) NULL) {
- MOD_INC_USE_COUNT;
- if (schedule_task(&portp->tqhangup) == 0)
- MOD_DEC_USE_COUNT;
+ schedule_task(&portp->tqhangup);
}
}
}
@@ -5350,6 +5343,7 @@
*/
memset(&stli_serial, 0, sizeof(struct tty_driver));
stli_serial.magic = TTY_DRIVER_MAGIC;
+ stli_serial.owner = THIS_MODULE;
stli_serial.driver_name = stli_drvname;
stli_serial.name = stli_serialname;
stli_serial.major = STL_SERIALMAJOR;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.042 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site