Skip to content

Commit

Permalink
[PATCH] pcmcia: do not set dev_node to NULL too early
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dominik Brodowski committed Apr 21, 2006
1 parent 90ff870 commit a0aab14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions drivers/pcmcia/pcmcia_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit a0aab14

Please sign in to comment.