diff options
Diffstat (limited to 'drivers/net/pcmcia/com20020_cs.c')
-rw-r--r-- | drivers/net/pcmcia/com20020_cs.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index 278438beb915..5643f94541bc 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
@@ -122,7 +122,6 @@ static void com20020_detach(struct pcmcia_device *p_dev); | |||
122 | 122 | ||
123 | typedef struct com20020_dev_t { | 123 | typedef struct com20020_dev_t { |
124 | struct net_device *dev; | 124 | struct net_device *dev; |
125 | dev_node_t node; | ||
126 | } com20020_dev_t; | 125 | } com20020_dev_t; |
127 | 126 | ||
128 | /*====================================================================== | 127 | /*====================================================================== |
@@ -195,18 +194,16 @@ static void com20020_detach(struct pcmcia_device *link) | |||
195 | 194 | ||
196 | dev_dbg(&link->dev, "com20020_detach\n"); | 195 | dev_dbg(&link->dev, "com20020_detach\n"); |
197 | 196 | ||
198 | if (link->dev_node) { | 197 | dev_dbg(&link->dev, "unregister...\n"); |
199 | dev_dbg(&link->dev, "unregister...\n"); | ||
200 | 198 | ||
201 | unregister_netdev(dev); | 199 | unregister_netdev(dev); |
202 | 200 | ||
203 | /* | 201 | /* |
204 | * this is necessary because we register our IRQ separately | 202 | * this is necessary because we register our IRQ separately |
205 | * from card services. | 203 | * from card services. |
206 | */ | 204 | */ |
207 | if (dev->irq) | 205 | if (dev->irq) |
208 | free_irq(dev->irq, dev); | 206 | free_irq(dev->irq, dev); |
209 | } | ||
210 | 207 | ||
211 | com20020_release(link); | 208 | com20020_release(link); |
212 | 209 | ||
@@ -297,7 +294,6 @@ static int com20020_config(struct pcmcia_device *link) | |||
297 | lp->card_name = "PCMCIA COM20020"; | 294 | lp->card_name = "PCMCIA COM20020"; |
298 | lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ | 295 | lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ |
299 | 296 | ||
300 | link->dev_node = &info->node; | ||
301 | SET_NETDEV_DEV(dev, &link->dev); | 297 | SET_NETDEV_DEV(dev, &link->dev); |
302 | 298 | ||
303 | i = com20020_found(dev, 0); /* calls register_netdev */ | 299 | i = com20020_found(dev, 0); /* calls register_netdev */ |
@@ -305,12 +301,9 @@ static int com20020_config(struct pcmcia_device *link) | |||
305 | if (i != 0) { | 301 | if (i != 0) { |
306 | dev_printk(KERN_NOTICE, &link->dev, | 302 | dev_printk(KERN_NOTICE, &link->dev, |
307 | "com20020_cs: com20020_found() failed\n"); | 303 | "com20020_cs: com20020_found() failed\n"); |
308 | link->dev_node = NULL; | ||
309 | goto failed; | 304 | goto failed; |
310 | } | 305 | } |
311 | 306 | ||
312 | strcpy(info->node.dev_name, dev->name); | ||
313 | |||
314 | dev_dbg(&link->dev,KERN_INFO "%s: port %#3lx, irq %d\n", | 307 | dev_dbg(&link->dev,KERN_INFO "%s: port %#3lx, irq %d\n", |
315 | dev->name, dev->base_addr, dev->irq); | 308 | dev->name, dev->base_addr, dev->irq); |
316 | return 0; | 309 | return 0; |