[PATCH] pcmcia: do not set dev_node to NULL too early
authorDominik Brodowski <linux@dominikbrodowski.net>
Tue, 4 Apr 2006 09:09:26 +0000 (11:09 +0200)
committerDominik Brodowski <linux@dominikbrodowski.net>
Fri, 21 Apr 2006 22:49:15 +0000 (00:49 +0200)
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>
drivers/pcmcia/ds.c
drivers/pcmcia/pcmcia_resource.c

index 7b7428c77d7aecea8b497e9782c6d2de1e6ccaa8..0f98cab35186123868ccd62f24b37f08ab9ae657 100644 (file)
@@ -476,6 +476,8 @@ static int pcmcia_device_remove(struct device * dev)
        if (p_drv->remove)
                p_drv->remove(p_dev);
 
+       p_dev->dev_node = NULL;
+
        /* check for proper unloading */
        if (p_dev->_irq || p_dev->_io || p_dev->_locked)
                printk(KERN_INFO "pcmcia: driver %s did not release config properly\n",
index 45063b4e5b780d5529e228390db91c7eb40bd5f1..2539c0b230622dc9056255b19a4c86f05389d845 100644 (file)
@@ -947,7 +947,5 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) {
        pcmcia_release_irq(p_dev, &p_dev->irq);
        if (&p_dev->win)
                pcmcia_release_window(p_dev->win);
-
-       p_dev->dev_node = NULL;
 }
 EXPORT_SYMBOL(pcmcia_disable_device);