diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-03-20 14:39:26 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-05-10 04:23:16 -0400 |
commit | c7c2fa079073ab92b0736a161b4cf1051a3e631f (patch) | |
tree | c23bb2e89f68601e5c37a1a0df9e83c9e71f9dd6 /drivers/net/pcmcia/3c574_cs.c | |
parent | ded6a1a341cb38c4cfeb09d3d01ffe16b5c804b3 (diff) |
pcmcia: dev_node removal (drivers with unregister_netdev check)
As a third step, remove any usage of dev_node_t from drivers which
only wrote to this typedef/struct, except to determine whether
register_netdev() succeeded previously. However, the function calling
unregister_netdev() was only ever called by the PCMCIA core if
register_netdev() succeeded previously. The lonely exception was
easily fixed.
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/pcmcia/3c574_cs.c')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 14428317c009..774e41c7def0 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -200,7 +200,6 @@ enum Window4 { /* Window 4: Xcvr/media bits. */ | |||
200 | 200 | ||
201 | struct el3_private { | 201 | struct el3_private { |
202 | struct pcmcia_device *p_dev; | 202 | struct pcmcia_device *p_dev; |
203 | dev_node_t node; | ||
204 | u16 advertising, partner; /* NWay media advertisement */ | 203 | u16 advertising, partner; /* NWay media advertisement */ |
205 | unsigned char phys; /* MII device address */ | 204 | unsigned char phys; /* MII device address */ |
206 | unsigned int autoselect:1, default_media:3; /* Read from the EEPROM/Wn3_Config. */ | 205 | unsigned int autoselect:1, default_media:3; /* Read from the EEPROM/Wn3_Config. */ |
@@ -309,8 +308,7 @@ static void tc574_detach(struct pcmcia_device *link) | |||
309 | 308 | ||
310 | dev_dbg(&link->dev, "3c574_detach()\n"); | 309 | dev_dbg(&link->dev, "3c574_detach()\n"); |
311 | 310 | ||
312 | if (link->dev_node) | 311 | unregister_netdev(dev); |
313 | unregister_netdev(dev); | ||
314 | 312 | ||
315 | tc574_release(link); | 313 | tc574_release(link); |
316 | 314 | ||
@@ -444,17 +442,13 @@ static int tc574_config(struct pcmcia_device *link) | |||
444 | } | 442 | } |
445 | } | 443 | } |
446 | 444 | ||
447 | link->dev_node = &lp->node; | ||
448 | SET_NETDEV_DEV(dev, &link->dev); | 445 | SET_NETDEV_DEV(dev, &link->dev); |
449 | 446 | ||
450 | if (register_netdev(dev) != 0) { | 447 | if (register_netdev(dev) != 0) { |
451 | printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); | 448 | printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); |
452 | link->dev_node = NULL; | ||
453 | goto failed; | 449 | goto failed; |
454 | } | 450 | } |
455 | 451 | ||
456 | strcpy(lp->node.dev_name, dev->name); | ||
457 | |||
458 | printk(KERN_INFO "%s: %s at io %#3lx, irq %d, " | 452 | printk(KERN_INFO "%s: %s at io %#3lx, irq %d, " |
459 | "hw_addr %pM.\n", | 453 | "hw_addr %pM.\n", |
460 | dev->name, cardname, dev->base_addr, dev->irq, | 454 | dev->name, cardname, dev->base_addr, dev->irq, |