static int snd_gus_synth_delete_device(snd_seq_device_t *dev) { snd_gus_card_t *gus; gus = *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev); if (gus == NULL) return -EINVAL; if (gus->gf1.seq_client >= 0) { snd_seq_delete_kernel_client(gus->gf1.seq_client); gus->gf1.seq_client = -1; } if (gus->gf1.ilist) snd_seq_instr_list_free(&gus->gf1.ilist); return 0; }
static int snd_opl3_seq_delete_device(struct snd_seq_device *dev) { struct snd_opl3 *opl3; opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev); if (opl3 == NULL) return -EINVAL; #ifdef CONFIG_SND_SEQUENCER_OSS snd_opl3_free_seq_oss(opl3); #endif if (opl3->seq_client >= 0) { snd_seq_delete_kernel_client(opl3->seq_client); opl3->seq_client = -1; } if (opl3->ilist) snd_seq_instr_list_free(&opl3->ilist); return 0; }