From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Jeff Garzik <jgarzik@mandrakesoft.com>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.5] : IrDA driver module fixes
Date: Wed, 8 Jan 2003 18:53:00 -0800 [thread overview]
Message-ID: <20030109025300.GC19178@bougret.hpl.hp.com> (raw)
ir254_driver_module_fixes-2.diff :
--------------------------------
o [CORRECT] Use SET_MODULE_OWNER() in various IrDA drivers
diff -u -p -r linux/drivers/net/irda-d5/ali-ircc.c linux/drivers/net/irda/ali-ircc.c
--- linux/drivers/net/irda-d5/ali-ircc.c Wed Jan 8 16:59:49 2003
+++ linux/drivers/net/irda/ali-ircc.c Wed Jan 8 17:27:03 2003
@@ -248,7 +248,6 @@ static int ali_ircc_open(int i, chipio_t
struct ali_ircc_cb *self;
struct pm_dev *pmdev;
int dongle_id;
- int ret;
int err;
IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
@@ -1303,6 +1302,9 @@ static int ali_ircc_net_init(struct net_
{
IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
+ /* Keep track of module usage */
+ SET_MODULE_OWNER(dev);
+
/* Setup to be a normal IrDA network device driver */
irda_device_setup(dev);
@@ -1369,8 +1371,6 @@ static int ali_ircc_net_open(struct net_
*/
self->irlap = irlap_open(dev, &self->qos, hwname);
- MOD_INC_USE_COUNT;
-
IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return 0;
@@ -1410,8 +1410,6 @@ static int ali_ircc_net_close(struct net
free_irq(self->io.irq, dev);
free_dma(self->io.dma);
-
- MOD_DEC_USE_COUNT;
IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
diff -u -p -r linux/drivers/net/irda-d5/donauboe.c linux/drivers/net/irda/donauboe.c
--- linux/drivers/net/irda-d5/donauboe.c Wed Jan 8 16:59:49 2003
+++ linux/drivers/net/irda/donauboe.c Wed Jan 8 17:20:06 2003
@@ -1388,6 +1388,9 @@ toshoboe_net_init (struct net_device *de
{
IRDA_DEBUG (4, "%s()\n", __FUNCTION__);
+ /* Keep track of module usage */
+ SET_MODULE_OWNER(dev);
+
/* Setup to be a normal IrDA network device driver */
irda_device_setup (dev);
@@ -1435,8 +1438,6 @@ toshoboe_net_open (struct net_device *de
self->irdad = 1;
- MOD_INC_USE_COUNT;
-
return 0;
}
@@ -1466,8 +1467,6 @@ toshoboe_net_close (struct net_device *d
{
toshoboe_stopchip (self);
}
-
- MOD_DEC_USE_COUNT;
return 0;
}
diff -u -p -r linux/drivers/net/irda-d5/irda-usb.c linux/drivers/net/irda/irda-usb.c
--- linux/drivers/net/irda-d5/irda-usb.c Wed Jan 8 16:59:49 2003
+++ linux/drivers/net/irda/irda-usb.c Wed Jan 8 17:20:06 2003
@@ -904,6 +904,9 @@ static int irda_usb_net_init(struct net_
{
IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ /* Keep track of module usage */
+ SET_MODULE_OWNER(dev);
+
/* Set up to be a normal IrDA network device driver */
irda_device_setup(dev);
@@ -974,7 +977,6 @@ static int irda_usb_net_open(struct net_
irda_usb_submit(self, NULL, self->rx_urb[i]);
/* Ready to play !!! */
- MOD_INC_USE_COUNT;
return 0;
}
@@ -1025,8 +1027,6 @@ static int irda_usb_net_close(struct net
if (self->irlap)
irlap_close(self->irlap);
self->irlap = NULL;
-
- MOD_DEC_USE_COUNT;
return 0;
}
diff -u -p -r linux/drivers/net/irda-d5/nsc-ircc.c linux/drivers/net/irda/nsc-ircc.c
--- linux/drivers/net/irda-d5/nsc-ircc.c Wed Jan 8 16:59:49 2003
+++ linux/drivers/net/irda/nsc-ircc.c Wed Jan 8 17:20:06 2003
@@ -1866,6 +1866,9 @@ static int nsc_ircc_net_init(struct net_
{
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ /* Keep track of module usage */
+ SET_MODULE_OWNER(dev);
+
/* Setup to be a normal IrDA network device driver */
irda_device_setup(dev);
@@ -1934,8 +1937,6 @@ static int nsc_ircc_net_open(struct net_
*/
self->irlap = irlap_open(dev, &self->qos, hwname);
- MOD_INC_USE_COUNT;
-
return 0;
}
@@ -1982,8 +1983,6 @@ static int nsc_ircc_net_close(struct net
/* Restore bank register */
outb(bank, iobase+BSR);
-
- MOD_DEC_USE_COUNT;
return 0;
}
diff -u -p -r linux/drivers/net/irda-d5/w83977af_ir.c linux/drivers/net/irda/w83977af_ir.c
--- linux/drivers/net/irda-d5/w83977af_ir.c Wed Jan 8 16:59:49 2003
+++ linux/drivers/net/irda/w83977af_ir.c Wed Jan 8 17:20:06 2003
@@ -1197,6 +1197,9 @@ static int w83977af_net_init(struct net_
{
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ /* Keep track of module usage */
+ SET_MODULE_OWNER(dev);
+
/* Set up to be a normal IrDA network device driver */
irda_device_setup(dev);
@@ -1267,8 +1270,6 @@ static int w83977af_net_open(struct net_
*/
self->irlap = irlap_open(dev, &self->qos, hwname);
- MOD_INC_USE_COUNT;
-
return 0;
}
@@ -1316,8 +1317,6 @@ static int w83977af_net_close(struct net
/* Restore bank register */
outb(set, iobase+SSR);
-
- MOD_DEC_USE_COUNT;
return 0;
}
reply other threads:[~2003-01-09 2:44 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=20030109025300.GC19178@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=jgarzik@mandrakesoft.com \
--cc=jt@hpl.hp.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
all inboxes | Powered by JetHome®