diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-03-20 19:39:26 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-05-10 10:23:16 +0200 |
commit | c7c2fa079073ab92b0736a161b4cf1051a3e631f (patch) | |
tree | c23bb2e89f68601e5c37a1a0df9e83c9e71f9dd6 /drivers/net/wireless/orinoco | |
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/wireless/orinoco')
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco_cs.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/spectrum_cs.c | 14 |
2 files changed, 2 insertions, 26 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c index 5d29b11fdbc..03056ab7303 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c @@ -50,7 +50,6 @@ MODULE_PARM_DESC(ignore_cis_vcc, "Allow voltage mismatch between card and socket * struct orinoco_private */ struct orinoco_pccard { struct pcmcia_device *p_dev; - dev_node_t node; /* Used to handle hard reset */ /* yuck, we need this hack to work around the insanity of the @@ -140,8 +139,7 @@ static void orinoco_cs_detach(struct pcmcia_device *link) { struct orinoco_private *priv = link->priv; - if (link->dev_node) - orinoco_if_del(priv); + orinoco_if_del(priv); orinoco_cs_release(link); @@ -226,7 +224,6 @@ static int orinoco_cs_config(struct pcmcia_device *link) { struct orinoco_private *priv = link->priv; - struct orinoco_pccard *card = priv->card; hermes_t *hw = &priv->hw; int ret; void __iomem *mem; @@ -276,9 +273,6 @@ orinoco_cs_config(struct pcmcia_device *link) if (ret) goto failed; - /* Ok, we have the configuration, prepare to register the netdev */ - card->node.major = card->node.minor = 0; - /* Initialise the main driver */ if (orinoco_init(priv) != 0) { printk(KERN_ERR PFX "orinoco_init() failed\n"); @@ -292,12 +286,6 @@ orinoco_cs_config(struct pcmcia_device *link) goto failed; } - /* At this point, the dev_node_t structure(s) needs to be - * initialized and arranged in a linked list at link->dev_node. */ - strcpy(card->node.dev_name, priv->ndev->name); - link->dev_node = &card->node; /* link->dev_node being non-NULL is also - * used to indicate that the - * net_device has been registered */ return 0; failed: diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index 7a8e056cd62..41b9ce42585 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c @@ -57,7 +57,6 @@ MODULE_PARM_DESC(ignore_cis_vcc, "Allow voltage mismatch between card and socket * struct orinoco_private */ struct orinoco_pccard { struct pcmcia_device *p_dev; - dev_node_t node; }; /********************************************************************/ @@ -214,8 +213,7 @@ static void spectrum_cs_detach(struct pcmcia_device *link) { struct orinoco_private *priv = link->priv; - if (link->dev_node) - orinoco_if_del(priv); + orinoco_if_del(priv); spectrum_cs_release(link); @@ -300,7 +298,6 @@ static int spectrum_cs_config(struct pcmcia_device *link) { struct orinoco_private *priv = link->priv; - struct orinoco_pccard *card = priv->card; hermes_t *hw = &priv->hw; int ret; void __iomem *mem; @@ -350,9 +347,6 @@ spectrum_cs_config(struct pcmcia_device *link) if (ret) goto failed; - /* Ok, we have the configuration, prepare to register the netdev */ - card->node.major = card->node.minor = 0; - /* Reset card */ if (spectrum_cs_hard_reset(priv) != 0) goto failed; @@ -370,12 +364,6 @@ spectrum_cs_config(struct pcmcia_device *link) goto failed; } - /* At this point, the dev_node_t structure(s) needs to be - * initialized and arranged in a linked list at link->dev_node. */ - strcpy(card->node.dev_name, priv->ndev->name); - link->dev_node = &card->node; /* link->dev_node being non-NULL is also - * used to indicate that the - * net_device has been registered */ return 0; failed: |