aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/smc91c92_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-03-20 14:39:26 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-05-10 04:23:16 -0400
commitc7c2fa079073ab92b0736a161b4cf1051a3e631f (patch)
treec23bb2e89f68601e5c37a1a0df9e83c9e71f9dd6 /drivers/net/pcmcia/smc91c92_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/smc91c92_cs.c')
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index ad061c7106b5..59796e7d09c4 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -103,7 +103,6 @@ struct smc_private {
103 u_short manfid; 103 u_short manfid;
104 u_short cardid; 104 u_short cardid;
105 105
106 dev_node_t node;
107 struct sk_buff *saved_skb; 106 struct sk_buff *saved_skb;
108 int packets_waiting; 107 int packets_waiting;
109 void __iomem *base; 108 void __iomem *base;
@@ -323,7 +322,6 @@ static int smc91c92_probe(struct pcmcia_device *link)
323 return -ENOMEM; 322 return -ENOMEM;
324 smc = netdev_priv(dev); 323 smc = netdev_priv(dev);
325 smc->p_dev = link; 324 smc->p_dev = link;
326 link->priv = dev;
327 325
328 spin_lock_init(&smc->lock); 326 spin_lock_init(&smc->lock);
329 link->io.NumPorts1 = 16; 327 link->io.NumPorts1 = 16;
@@ -361,8 +359,7 @@ static void smc91c92_detach(struct pcmcia_device *link)
361 359
362 dev_dbg(&link->dev, "smc91c92_detach\n"); 360 dev_dbg(&link->dev, "smc91c92_detach\n");
363 361
364 if (link->dev_node) 362 unregister_netdev(dev);
365 unregister_netdev(dev);
366 363
367 smc91c92_release(link); 364 smc91c92_release(link);
368 365
@@ -956,17 +953,13 @@ static int smc91c92_config(struct pcmcia_device *link)
956 SMC_SELECT_BANK(0); 953 SMC_SELECT_BANK(0);
957 } 954 }
958 955
959 link->dev_node = &smc->node;
960 SET_NETDEV_DEV(dev, &link->dev); 956 SET_NETDEV_DEV(dev, &link->dev);
961 957
962 if (register_netdev(dev) != 0) { 958 if (register_netdev(dev) != 0) {
963 printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n"); 959 printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
964 link->dev_node = NULL;
965 goto config_undo; 960 goto config_undo;
966 } 961 }
967 962
968 strcpy(smc->node.dev_name, dev->name);
969
970 printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, " 963 printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, "
971 "hw_addr %pM\n", 964 "hw_addr %pM\n",
972 dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq, 965 dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq,