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>
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user