static void vxpocket_detach(dev_link_t *link) { struct snd_vxpocket *vxp; vx_core_t *chip; dev_link_t **linkp; if (! link) return; vxp = link->priv; chip = (vx_core_t *)vxp; card_alloc &= ~(1 << vxp->index); /* Remove the interface data from the linked list */ for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) if (*linkp == link) { *linkp = link->next; break; } chip->chip_status |= VX_STAT_IS_STALE; /* to be sure */ snd_card_disconnect(chip->card); vxpocket_release(link); snd_card_free_in_thread(chip->card); }
static void vxpocket_detach(struct pcmcia_device *link) { struct snd_vxpocket *vxp; struct vx_core *chip; if (! link) return; vxp = link->priv; chip = (struct vx_core *)vxp; card_alloc &= ~(1 << vxp->index); chip->chip_status |= VX_STAT_IS_STALE; /* to be sure */ snd_card_disconnect(chip->card); vxpocket_release(link); snd_card_free_when_closed(chip->card); }