static void efw_remove(struct fw_unit *unit) { struct snd_efw *efw = dev_get_drvdata(&unit->device); /* No need to wait for releasing card object in this context. */ snd_card_free_when_closed(efw->card); }
/* Line 6 device disconnected. */ void line6_disconnect(struct usb_interface *interface) { struct usb_line6 *line6 = usb_get_intfdata(interface); struct usb_device *usbdev = interface_to_usbdev(interface); if (!line6) return; if (WARN_ON(usbdev != line6->usbdev)) return; if (line6->urb_listen != NULL) line6_stop_listen(line6); snd_card_disconnect(line6->card); if (line6->line6pcm) line6_pcm_disconnect(line6->line6pcm); if (line6->disconnect) line6->disconnect(line6); dev_info(&interface->dev, "Line 6 %s now disconnected\n", line6->properties->name); /* make sure the device isn't destructed twice: */ usb_set_intfdata(interface, NULL); snd_card_free_when_closed(line6->card); }
static void __devexit snd_mpu401_pnp_remove(struct pnp_dev *dev) { struct snd_card *card = (struct snd_card *) pnp_get_drvdata(dev); snd_card_disconnect(card); snd_card_free_when_closed(card); }
static void efw_remove(struct fw_unit *unit) { struct snd_efw *efw = dev_get_drvdata(&unit->device); snd_efw_stream_destroy_duplex(efw); snd_efw_transaction_remove_instance(efw); snd_card_disconnect(efw->card); snd_card_free_when_closed(efw->card); }
static void bebob_remove(struct fw_unit *unit) { struct snd_bebob *bebob = dev_get_drvdata(&unit->device); if (bebob == NULL) return; /* No need to wait for releasing card object in this context. */ snd_card_free_when_closed(bebob->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_when_closed(chip->card); }
static void oxfw_remove(struct fw_unit *unit) { struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device); snd_card_disconnect(oxfw->card); snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream); if (oxfw->has_output) snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); snd_card_free_when_closed(oxfw->card); }
static void bebob_remove(struct fw_unit *unit) { struct snd_bebob *bebob = dev_get_drvdata(&unit->device); if (bebob == NULL) return; /* Awake bus-reset waiters. */ if (!completion_done(&bebob->bus_reset)) complete_all(&bebob->bus_reset); /* No need to wait for releasing card object in this context. */ snd_card_free_when_closed(bebob->card); }
static void snd_bebob_remove(struct fw_unit *unit) { struct snd_bebob *bebob = dev_get_drvdata(&unit->device); /* this is for firmware bootloader */ if (bebob == NULL) goto end; snd_bebob_destroy_pcm_devices(bebob); snd_card_disconnect(bebob->card); snd_card_free_when_closed(bebob->card); end: return; }
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); }
static void usb6fire_chip_abort(struct sfire_chip *chip) { if (chip) { if (chip->pcm) usb6fire_pcm_abort(chip); if (chip->midi) usb6fire_midi_abort(chip); if (chip->comm) usb6fire_comm_abort(chip); if (chip->control) usb6fire_control_abort(chip); if (chip->card) { snd_card_disconnect(chip->card); snd_card_free_when_closed(chip->card); chip->card = NULL; } } }
static void snd_tscm_remove(struct fw_unit *unit) { struct snd_tscm *tscm = dev_get_drvdata(&unit->device); /* * Confirm to stop the work for registration before the sound card is * going to be released. The work is not scheduled again because bus * reset handler is not called anymore. */ cancel_delayed_work_sync(&tscm->dwork); if (tscm->registered) { /* No need to wait for releasing card object in this context. */ snd_card_free_when_closed(tscm->card); } else { /* Don't forget this case. */ tscm_free(tscm); } }
static void bcd2000_disconnect(struct usb_interface *interface) { struct bcd2000 *bcd2k = usb_get_intfdata(interface); if (!bcd2k) return; mutex_lock(&devices_mutex); /* make sure that userspace cannot create new requests */ snd_card_disconnect(bcd2k->card); bcd2000_free_usb_related_resources(bcd2k, interface); clear_bit(bcd2k->card_index, devices_used); snd_card_free_when_closed(bcd2k->card); mutex_unlock(&devices_mutex); }