Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0aab143 authored by Dominik Brodowski's avatar Dominik Brodowski
Browse files

[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: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 90ff8700
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -476,6 +476,8 @@ static int pcmcia_device_remove(struct device * dev)
	if (p_drv->remove)
	if (p_drv->remove)
	       	p_drv->remove(p_dev);
	       	p_drv->remove(p_dev);


	p_dev->dev_node = NULL;

	/* check for proper unloading */
	/* check for proper unloading */
	if (p_dev->_irq || p_dev->_io || p_dev->_locked)
	if (p_dev->_irq || p_dev->_io || p_dev->_locked)
		printk(KERN_INFO "pcmcia: driver %s did not release config properly\n",
		printk(KERN_INFO "pcmcia: driver %s did not release config properly\n",
+0 −2
Original line number Original line Diff line number Diff line
@@ -947,7 +947,5 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) {
	pcmcia_release_irq(p_dev, &p_dev->irq);
	pcmcia_release_irq(p_dev, &p_dev->irq);
	if (&p_dev->win)
	if (&p_dev->win)
		pcmcia_release_window(p_dev->win);
		pcmcia_release_window(p_dev->win);

	p_dev->dev_node = NULL;
}
}
EXPORT_SYMBOL(pcmcia_disable_device);
EXPORT_SYMBOL(pcmcia_disable_device);