From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] TTY changes for 2.5.69
Date: Wed, 7 May 2003 16:16:27 -0700 [thread overview]
Message-ID: <1052349387898@kroah.com> (raw)
In-Reply-To: <10523493872739@kroah.com>
ChangeSet 1.1102, 2003/05/07 15:00:12-07:00, hannal@us.ibm.com
[PATCH] mxser tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT
drivers/char/mxser.c | 19 ++++---------------
1 files changed, 4 insertions(+), 15 deletions(-)
diff -Nru a/drivers/char/mxser.c b/drivers/char/mxser.c
--- a/drivers/char/mxser.c Wed May 7 16:01:01 2003
+++ b/drivers/char/mxser.c Wed May 7 16:01:01 2003
@@ -501,6 +501,7 @@
memset(&mxvar_sdriver, 0, sizeof(struct tty_driver));
mxvar_sdriver.magic = TTY_DRIVER_MAGIC;
+ mxvar_sdriver.owner = THIS_MODULE;
mxvar_sdriver.name = "ttyM";
mxvar_sdriver.major = ttymajor;
mxvar_sdriver.minor_start = 0;
@@ -708,7 +709,6 @@
tty_hangup(tty); /* FIXME: module removal race here - AKPM */
}
}
- MOD_DEC_USE_COUNT;
}
/*
@@ -767,8 +767,6 @@
info->session = current->session;
info->pgrp = current->pgrp;
- MOD_INC_USE_COUNT;
-
return (0);
}
@@ -795,7 +793,6 @@
if (tty_hung_up_p(filp)) {
restore_flags(flags);
- MOD_DEC_USE_COUNT;
return;
}
if ((tty->count == 1) && (info->count != 1)) {
@@ -817,7 +814,6 @@
}
if (info->count) {
restore_flags(flags);
- MOD_DEC_USE_COUNT;
return;
}
info->flags |= ASYNC_CLOSING;
@@ -881,7 +877,6 @@
wake_up_interruptible(&info->close_wait);
restore_flags(flags);
- MOD_DEC_USE_COUNT;
}
static int mxser_write(struct tty_struct *tty, int from_user,
@@ -1492,9 +1487,7 @@
if (info->xmit_cnt < WAKEUP_CHARS) {
set_bit(MXSER_EVENT_TXLOW, &info->event);
- MOD_INC_USE_COUNT;
- if (schedule_work(&info->tqueue) == 0)
- MOD_DEC_USE_COUNT;
+ schedule_work(&info->tqueue);
}
if (info->xmit_cnt <= 0) {
info->IER &= ~UART_IER_THRI;
@@ -1523,9 +1516,7 @@
else if (!((info->flags & ASYNC_CALLOUT_ACTIVE) &&
(info->flags & ASYNC_CALLOUT_NOHUP)))
set_bit(MXSER_EVENT_HANGUP, &info->event);
- MOD_INC_USE_COUNT;
- if (schedule_work(&info->tqueue) == 0)
- MOD_DEC_USE_COUNT;
+ schedule_work(&info->tqueue);
}
if (info->flags & ASYNC_CTS_FLOW) {
if (info->tty->hw_stopped) {
@@ -1535,9 +1526,7 @@
outb(info->IER, info->base + UART_IER);
set_bit(MXSER_EVENT_TXLOW, &info->event);
- MOD_INC_USE_COUNT;
- if (schedule_work(&info->tqueue) == 0)
- MOD_DEC_USE_COUNT;
+ schedule_work(&info->tqueue);
}
} else {
if (!(status & UART_MSR_CTS)) {
next prev parent reply other threads:[~2003-05-07 23:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-07 23:15 [BK PATCH] TTY changes for 2.5.69 Greg KH
2003-05-07 23:16 ` [PATCH] " Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH [this message]
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
2003-05-07 23:16 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1052349387898@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox