static void airo_detach(dev_link_t *link) { dev_link_t **linkp; DEBUG(0, "airo_detach(0x%p)\n", link); /* Locate device structure */ for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) if (*linkp == link) break; if (*linkp == NULL) return; if (link->state & DEV_CONFIG) airo_release(link); if ( ((local_info_t*)link->priv)->eth_dev ) { stop_airo_card( ((local_info_t*)link->priv)->eth_dev, 0 ); } ((local_info_t*)link->priv)->eth_dev = NULL; /* Break the link with Card Services */ if (link->handle) pcmcia_deregister_client(link->handle); /* Unlink device structure, free pieces */ *linkp = link->next; if (link->priv) { kfree(link->priv); } kfree(link); } /* airo_detach */
static void airo_detach(struct pcmcia_device *link) { DEBUG(0, "airo_detach(0x%p)\n", link); airo_release(link); if ( ((local_info_t*)link->priv)->eth_dev ) { stop_airo_card( ((local_info_t*)link->priv)->eth_dev, 0 ); } ((local_info_t*)link->priv)->eth_dev = NULL; kfree(link->priv); } /* airo_detach */
static void airo_detach(struct pcmcia_device *link) { dev_dbg(&link->dev, "airo_detach\n"); airo_release(link); if (((local_info_t *)link->priv)->eth_dev) { stop_airo_card(((local_info_t *)link->priv)->eth_dev, 0); } ((local_info_t *)link->priv)->eth_dev = NULL; kfree(link->priv); }
static void airo_detach(dev_link_t *link) { dev_link_t **linkp; DEBUG(0, "airo_detach(0x%p)\n", link); /* Locate device structure */ for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) if (*linkp == link) break; if (*linkp == NULL) return; del_timer(&link->release); if ( link->state & DEV_CONFIG ) { airo_release( (int)link ); if ( link->state & DEV_STALE_CONFIG ) { link->state |= DEV_STALE_LINK; return; } } if ( ((local_info_t*)link->priv)->eth_dev ) { stop_airo_card( ((local_info_t*)link->priv)->eth_dev, 0 ); } ((local_info_t*)link->priv)->eth_dev = 0; /* Break the link with Card Services */ if (link->handle) CardServices(DeregisterClient, link->handle); /* Unlink device structure, free pieces */ *linkp = link->next; if (link->priv) { kfree(link->priv); } kfree(link); } /* airo_detach */