summaryrefslogtreecommitdiffstats
path: root/drivers/net/sgiseeq.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-10-10 14:50:51 +0100
committerJeff Garzik <jgarzik@pobox.com>2005-10-18 18:03:47 -0400
commit2891439e7378e35534d7eb32f77671dc4d61db4c (patch)
treed2cba6b9391f5488f2b6d8d6418b43e9ae3c2969 /drivers/net/sgiseeq.c
parentbc053d45cb0ca5daeaa69ae9ac43cdea42693f60 (diff)
downloadop-kernel-dev-2891439e7378e35534d7eb32f77671dc4d61db4c.zip
op-kernel-dev-2891439e7378e35534d7eb32f77671dc4d61db4c.tar.gz
[PATCH] sgiseeq: Fix resource handling.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/net/sgiseeq.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/sgiseeq.c')
-rw-r--r--drivers/net/sgiseeq.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index 9bc3b1c..a9d2e4f 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -493,11 +493,13 @@ static int sgiseeq_close(struct net_device *dev)
{
struct sgiseeq_private *sp = netdev_priv(dev);
struct sgiseeq_regs *sregs = sp->sregs;
+ unsigned int irq = dev->irq;
netif_stop_queue(dev);
/* Shutdown the Seeq. */
reset_hpc3_and_seeq(sp->hregs, sregs);
+ free_irq(irq, dev);
return 0;
}
@@ -734,7 +736,7 @@ static int sgiseeq_init(struct hpc3_regs* regs, int irq)
return 0;
err_out_free_page:
- free_page((unsigned long) sp);
+ free_page((unsigned long) sp->srings);
err_out_free_dev:
kfree(dev);
@@ -754,15 +756,12 @@ static void __exit sgiseeq_exit(void)
{
struct net_device *next, *dev;
struct sgiseeq_private *sp;
- int irq;
for (dev = root_sgiseeq_dev; dev; dev = next) {
sp = (struct sgiseeq_private *) netdev_priv(dev);
next = sp->next_module;
- irq = dev->irq;
unregister_netdev(dev);
- free_irq(irq, dev);
- free_page((unsigned long) sp);
+ free_page((unsigned long) sp->srings);
free_netdev(dev);
}
}
OpenPOWER on IntegriCloud