summaryrefslogtreecommitdiffstats
path: root/drivers/net/sb1000.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-01-10 05:27:25 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-01-10 05:27:25 +0000
commitc9c06167e7933d93a6e396174c68abf242294abb (patch)
treed9a8bb30663e9a3405a1ef37ffb62bc14b9f019f /drivers/net/sb1000.c
parentf79e8cc3c34e4192a3e5ef4cc9c6542fdef703c0 (diff)
Merge with Linux 2.4.0-test12.
Diffstat (limited to 'drivers/net/sb1000.c')
-rw-r--r--drivers/net/sb1000.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c
index 793af1577..95a7c864e 100644
--- a/drivers/net/sb1000.c
+++ b/drivers/net/sb1000.c
@@ -210,6 +210,9 @@ sb1000_probe(struct net_device *dev)
dev->rmem_end, serial_number, dev->irq);
dev = init_etherdev(dev, 0);
+ if (!dev)
+ return -ENOMEM;
+ SET_MODULE_OWNER(dev);
/* Make up a SB1000-specific-data structure. */
dev->priv = kmalloc(sizeof(struct sb1000_private), GFP_KERNEL);
@@ -1004,7 +1007,6 @@ sb1000_open(struct net_device *dev)
netif_start_queue(dev);
- MOD_INC_USE_COUNT;
return 0; /* Always succeed */
}
@@ -1195,7 +1197,6 @@ static int sb1000_close(struct net_device *dev)
dev_kfree_skb(lp->rx_skb[i]);
}
}
- MOD_DEC_USE_COUNT;
return 0;
}
@@ -1205,14 +1206,9 @@ MODULE_DESCRIPTION("General Instruments SB1000 driver");
MODULE_PARM(io, "1-2i");
MODULE_PARM(irq, "i");
-static struct net_device dev_sb1000 = {
- "",
- 0, 0, 0, 0,
- 0, 0,
- 0, 0, 0, NULL, sb1000_probe };
-
-static int io[2] = {0, 0};
-static int irq = 0;
+static struct net_device dev_sb1000;
+static int io[2];
+static int irq;
int
init_module(void)
@@ -1226,6 +1222,7 @@ init_module(void)
printk(KERN_ERR "sb1000: can't register any device cm<n>\n");
return -ENFILE;
}
+ dev_sb1000.init = sb1000_probe;
dev_sb1000.base_addr = io[0];
/* rmem_end holds the second I/O address - fv */
dev_sb1000.rmem_end = io[1];