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 __devexit sscape_pnp_remove(struct pnp_card_link * pcard) { snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); pnp_set_card_drvdata(pcard, NULL); snd_card_disconnect(card); snd_card_free_in_thread(card); }
/* * snd_pdacf_detach - detach callback for cs */ static void snd_pdacf_detach(struct pcmcia_device *link) { struct snd_pdacf *chip = link->priv; snd_printdd(KERN_DEBUG "pdacf_detach called\n"); if (chip->chip_status & PDAUDIOCF_STAT_IS_CONFIGURED) snd_pdacf_powerdown(chip); chip->chip_status |= PDAUDIOCF_STAT_IS_STALE; /* to be sure */ snd_card_disconnect(chip->card); snd_card_free_in_thread(chip->card); }
static int __devexit snd_mpu401_acpi_remove(struct acpi_device *device, int type) { snd_card_t *card; if (!device) return -EINVAL; card = (snd_card_t *)acpi_driver_data(device); if (!card) return -EINVAL; snd_card_disconnect(card); snd_card_free_in_thread(card); acpi_driver_data(device) = NULL; return 0; }
/* * snd_pdacf_detach - detach callback for cs */ static void snd_pdacf_detach(dev_link_t *link) { pdacf_t *chip = link->priv; snd_printdd(KERN_DEBUG "pdacf_detach called\n"); /* Remove the interface data from the linked list */ { dev_link_t **linkp; /* Locate device structure */ for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) if (*linkp == link) break; if (*linkp) *linkp = link->next; } if (chip->chip_status & PDAUDIOCF_STAT_IS_CONFIGURED) snd_pdacf_powerdown(chip); chip->chip_status |= PDAUDIOCF_STAT_IS_STALE; /* to be sure */ snd_card_disconnect(chip->card); snd_card_free_in_thread(chip->card); }