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/pcnet_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/pcnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index af09be487577..6f77a768ba88 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -208,7 +208,6 @@ static hw_info_t dl10022_info = { 0, 0, 0, 0, IS_DL10022|HAS_MII }; | |||
208 | 208 | ||
209 | typedef struct pcnet_dev_t { | 209 | typedef struct pcnet_dev_t { |
210 | struct pcmcia_device *p_dev; | 210 | struct pcmcia_device *p_dev; |
211 | dev_node_t node; | ||
212 | u_int flags; | 211 | u_int flags; |
213 | void __iomem *base; | 212 | void __iomem *base; |
214 | struct timer_list watchdog; | 213 | struct timer_list watchdog; |
@@ -287,8 +286,7 @@ static void pcnet_detach(struct pcmcia_device *link) | |||
287 | 286 | ||
288 | dev_dbg(&link->dev, "pcnet_detach\n"); | 287 | dev_dbg(&link->dev, "pcnet_detach\n"); |
289 | 288 | ||
290 | if (link->dev_node) | 289 | unregister_netdev(dev); |
291 | unregister_netdev(dev); | ||
292 | 290 | ||
293 | pcnet_release(link); | 291 | pcnet_release(link); |
294 | 292 | ||
@@ -639,17 +637,13 @@ static int pcnet_config(struct pcmcia_device *link) | |||
639 | if (info->flags & (IS_DL10019|IS_DL10022)) | 637 | if (info->flags & (IS_DL10019|IS_DL10022)) |
640 | mii_phy_probe(dev); | 638 | mii_phy_probe(dev); |
641 | 639 | ||
642 | link->dev_node = &info->node; | ||
643 | SET_NETDEV_DEV(dev, &link->dev); | 640 | SET_NETDEV_DEV(dev, &link->dev); |
644 | 641 | ||
645 | if (register_netdev(dev) != 0) { | 642 | if (register_netdev(dev) != 0) { |
646 | printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n"); | 643 | printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n"); |
647 | link->dev_node = NULL; | ||
648 | goto failed; | 644 | goto failed; |
649 | } | 645 | } |
650 | 646 | ||
651 | strcpy(info->node.dev_name, dev->name); | ||
652 | |||
653 | if (info->flags & (IS_DL10019|IS_DL10022)) { | 647 | if (info->flags & (IS_DL10019|IS_DL10022)) { |
654 | u_char id = inb(dev->base_addr + 0x1a); | 648 | u_char id = inb(dev->base_addr + 0x1a); |
655 | printk(KERN_INFO "%s: NE2000 (DL100%d rev %02x): ", | 649 | printk(KERN_INFO "%s: NE2000 (DL100%d rev %02x): ", |