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/axnet_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/axnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 967547a84b4b..59f6fa3c9ddc 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -113,7 +113,6 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id); | |||
113 | 113 | ||
114 | typedef struct axnet_dev_t { | 114 | typedef struct axnet_dev_t { |
115 | struct pcmcia_device *p_dev; | 115 | struct pcmcia_device *p_dev; |
116 | dev_node_t node; | ||
117 | caddr_t base; | 116 | caddr_t base; |
118 | struct timer_list watchdog; | 117 | struct timer_list watchdog; |
119 | int stale, fast_poll; | 118 | int stale, fast_poll; |
@@ -194,8 +193,7 @@ static void axnet_detach(struct pcmcia_device *link) | |||
194 | 193 | ||
195 | dev_dbg(&link->dev, "axnet_detach(0x%p)\n", link); | 194 | dev_dbg(&link->dev, "axnet_detach(0x%p)\n", link); |
196 | 195 | ||
197 | if (link->dev_node) | 196 | unregister_netdev(dev); |
198 | unregister_netdev(dev); | ||
199 | 197 | ||
200 | axnet_release(link); | 198 | axnet_release(link); |
201 | 199 | ||
@@ -392,17 +390,13 @@ static int axnet_config(struct pcmcia_device *link) | |||
392 | } | 390 | } |
393 | 391 | ||
394 | info->phy_id = (i < 32) ? i : -1; | 392 | info->phy_id = (i < 32) ? i : -1; |
395 | link->dev_node = &info->node; | ||
396 | SET_NETDEV_DEV(dev, &link->dev); | 393 | SET_NETDEV_DEV(dev, &link->dev); |
397 | 394 | ||
398 | if (register_netdev(dev) != 0) { | 395 | if (register_netdev(dev) != 0) { |
399 | printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n"); | 396 | printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n"); |
400 | link->dev_node = NULL; | ||
401 | goto failed; | 397 | goto failed; |
402 | } | 398 | } |
403 | 399 | ||
404 | strcpy(info->node.dev_name, dev->name); | ||
405 | |||
406 | printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, " | 400 | printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, " |
407 | "hw_addr %pM\n", | 401 | "hw_addr %pM\n", |
408 | dev->name, ((info->flags & IS_AX88790) ? 7 : 1), | 402 | dev->name, ((info->flags & IS_AX88790) ? 7 : 1), |