summaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/3c574_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-03-20 19:39:26 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2010-05-10 10:23:16 +0200
commitc7c2fa079073ab92b0736a161b4cf1051a3e631f (patch)
treec23bb2e89f68601e5c37a1a0df9e83c9e71f9dd6 /drivers/net/pcmcia/3c574_cs.c
parentded6a1a341cb38c4cfeb09d3d01ffe16b5c804b3 (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.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 14428317c00..774e41c7def 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. */
struct el3_private {
struct pcmcia_device *p_dev;
- dev_node_t node;
u16 advertising, partner; /* NWay media advertisement */
unsigned char phys; /* MII device address */
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)
dev_dbg(&link->dev, "3c574_detach()\n");
- if (link->dev_node)
- unregister_netdev(dev);
+ unregister_netdev(dev);
tc574_release(link);
@@ -444,17 +442,13 @@ static int tc574_config(struct pcmcia_device *link)
}
}
- link->dev_node = &lp->node;
SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
- link->dev_node = NULL;
goto failed;
}
- strcpy(lp->node.dev_name, dev->name);
-
printk(KERN_INFO "%s: %s at io %#3lx, irq %d, "
"hw_addr %pM.\n",
dev->name, cardname, dev->base_addr, dev->irq,