From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-kernel@vger.kernel.org
Cc: irda-users@lists.sourceforge.net
Subject: [PATCH][2.6.0-test2] remove MOD_{INC,DEC}_USE_COUNT from ircomm_tty.c
Date: Sun, 27 Jul 2003 23:57:40 +0400 [thread overview]
Message-ID: <200307272357.40144.arvidjaar@mail.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 119 bytes --]
This compiles and loads but I am not sure how to test it, I do not actually
have any ircomm device currently.
-andrey
[-- Attachment #2: 2.6.0-test2-ircomm_tty-USE_COUNT.patch --]
[-- Type: text/x-diff, Size: 1664 bytes --]
--- linux-2.6.0-test2-smp/net/irda/ircomm/ircomm_tty.c.MOD 2003-07-14 20:21:31.000000000 +0400
+++ linux-2.6.0-test2-smp/net/irda/ircomm/ircomm_tty.c 2003-07-27 23:22:20.000000000 +0400
@@ -117,6 +117,7 @@ int __init ircomm_tty_init(void)
return -ENOMEM;
}
+ driver->owner = THIS_MODULE,
driver->driver_name = "ircomm";
driver->name = "ircomm";
driver->devfs_name = "ircomm";
@@ -363,10 +364,8 @@ static int ircomm_tty_open(struct tty_st
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
- MOD_INC_USE_COUNT;
line = tty->index;
if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) {
- MOD_DEC_USE_COUNT;
return -ENODEV;
}
@@ -377,7 +376,6 @@ static int ircomm_tty_open(struct tty_st
self = kmalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL);
if (self == NULL) {
ERROR("%s(), kmalloc failed!\n", __FUNCTION__);
- MOD_DEC_USE_COUNT;
return -ENOMEM;
}
memset(self, 0, sizeof(struct ircomm_tty_cb));
@@ -503,7 +501,6 @@ static void ircomm_tty_close(struct tty_
spin_lock_irqsave(&self->spinlock, flags);
if (tty_hung_up_p(filp)) {
- MOD_DEC_USE_COUNT;
spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(0, "%s(), returning 1\n", __FUNCTION__ );
@@ -530,7 +527,6 @@ static void ircomm_tty_close(struct tty_
self->open_count = 0;
}
if (self->open_count) {
- MOD_DEC_USE_COUNT;
spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(0, "%s(), open count > 0\n", __FUNCTION__ );
@@ -572,8 +568,6 @@ static void ircomm_tty_close(struct tty_
self->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
wake_up_interruptible(&self->close_wait);
-
- MOD_DEC_USE_COUNT;
}
/*
reply other threads:[~2003-07-28 2:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200307272357.40144.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=irda-users@lists.sourceforge.net \
--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;
as well as URLs for NNTP newsgroup(s).