Commit a0aab14322a74ab5665704c6155bf48fbc38f445

Authored by Dominik Brodowski
1 parent 90ff87008d

[PATCH] pcmcia: do not set dev_node to NULL too early

If we set dev_node to NULL too early, some drivers which used this to
determine whether unregister_netdev() needs to be called fail when removing
a PCMCIA card.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -476,6 +476,8 @@
476 476 if (p_drv->remove)
477 477 p_drv->remove(p_dev);
478 478  
  479 + p_dev->dev_node = NULL;
  480 +
479 481 /* check for proper unloading */
480 482 if (p_dev->_irq || p_dev->_io || p_dev->_locked)
481 483 printk(KERN_INFO "pcmcia: driver %s did not release config properly\n",
drivers/pcmcia/pcmcia_resource.c
... ... @@ -947,8 +947,6 @@
947 947 pcmcia_release_irq(p_dev, &p_dev->irq);
948 948 if (&p_dev->win)
949 949 pcmcia_release_window(p_dev->win);
950   -
951   - p_dev->dev_node = NULL;
952 950 }
953 951 EXPORT_SYMBOL(pcmcia_disable_device);