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: <10523493873374@kroah.com> (raw)
In-Reply-To: <10523493872313@kroah.com>
ChangeSet 1.1104, 2003/05/07 15:00:32-07:00, hannal@us.ibm.com
[PATCH] moxa tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT
drivers/char/moxa.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff -Nru a/drivers/char/moxa.c b/drivers/char/moxa.c
--- a/drivers/char/moxa.c Wed May 7 16:00:52 2003
+++ b/drivers/char/moxa.c Wed May 7 16:00:52 2003
@@ -341,6 +341,7 @@
memset(&moxaDriver, 0, sizeof(struct tty_driver));
memset(&moxaCallout, 0, sizeof(struct tty_driver));
moxaDriver.magic = TTY_DRIVER_MAGIC;
+ moxaDriver.owner = THIS_MODULE;
moxaDriver.name = "ttya";
moxaDriver.major = ttymajor;
moxaDriver.minor_start = 0;
@@ -544,7 +545,6 @@
ch->asyncflags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
}
}
- MOD_DEC_USE_COUNT;
}
static int moxa_open(struct tty_struct *tty, struct file *filp)
@@ -556,7 +556,6 @@
port = PORTNO(tty);
if (port == MAX_PORTS) {
- MOD_INC_USE_COUNT;
return (0);
}
if (!MoxaPortIsValid(port)) {
@@ -579,7 +578,6 @@
}
up(&moxaBuffSem);
- MOD_INC_USE_COUNT;
ch = &moxaChannels[port];
ch->count++;
tty->driver_data = ch;
@@ -619,7 +617,6 @@
port = PORTNO(tty);
if (port == MAX_PORTS) {
- MOD_DEC_USE_COUNT;
return;
}
if (!MoxaPortIsValid(port)) {
@@ -633,7 +630,6 @@
return;
}
if (tty_hung_up_p(filp)) {
- MOD_DEC_USE_COUNT;
return;
}
ch = (struct moxa_str *) tty->driver_data;
@@ -649,7 +645,6 @@
ch->count = 0;
}
if (ch->count) {
- MOD_DEC_USE_COUNT;
return;
}
ch->asyncflags |= ASYNC_CLOSING;
@@ -688,7 +683,6 @@
ch->asyncflags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE |
ASYNC_CLOSING);
wake_up_interruptible(&ch->close_wait);
- MOD_DEC_USE_COUNT;
}
static int moxa_write(struct tty_struct *tty, int from_user,
@@ -1024,9 +1018,7 @@
wake_up_interruptible(&ch->open_wait);
else {
set_bit(MOXA_EVENT_HANGUP, &ch->event);
- MOD_DEC_USE_COUNT;
- if (schedule_work(&ch->tqueue) == 0)
- MOD_INC_USE_COUNT;
+ schedule_work(&ch->tqueue);
}
}
}
next prev parent reply other threads:[~2003-05-07 23:31 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
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
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=10523493873374@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