dev = info->dev;
+ if (link->dev) {
+ DEBUG(1,"unregister...\n");
+
+ unregister_netdev(dev);
+
+ /*
+ * this is necessary because we register our IRQ separately
+ * from card services.
+ */
+ if (dev->irq)
+ free_irq(dev->irq, dev);
+ }
+
if (link->state & DEV_CONFIG)
com20020_release(link);
dev = info->dev;
if (dev)
{
- if (link->dev)
- {
- DEBUG(1,"unregister...\n");
-
- unregister_netdev(dev);
-
- /*
- * this is necessary because we register our IRQ separately
- * from card services.
- */
- if (dev->irq)
- free_irq(dev->irq, dev);
- /* ...but I/O ports are done automatically by card services */
- }
-
DEBUG(1,"kfree...\n");
free_netdev(dev);
}
switch (event) {
case CS_EVENT_CARD_REMOVAL:
link->state &= ~DEV_PRESENT;
- if (link->state & DEV_CONFIG) {
+ if (link->state & DEV_CONFIG)
netif_device_detach(dev);
- link->state |= DEV_RELEASE_PENDING;
- }
break;
case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT;