static int __init alsa_opl3_seq_init(void) { static struct snd_seq_dev_ops ops = { snd_opl3_seq_new_device, snd_opl3_seq_delete_device }; return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OPL3, &ops, sizeof(struct snd_opl3 *)); }
static int __init alsa_seq_midi_init(void) { static struct snd_seq_dev_ops ops = { snd_seq_midisynth_register_port, snd_seq_midisynth_unregister_port, }; memset(&synths, 0, sizeof(synths)); snd_seq_autoload_lock(); snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_MIDISYNTH, &ops, 0); snd_seq_autoload_unlock(); return 0; }
static int __init alsa_seq_oss_init(void) { int rc; static struct snd_seq_dev_ops ops = { snd_seq_oss_synth_register, snd_seq_oss_synth_unregister, }; snd_seq_autoload_lock(); if ((rc = register_device()) < 0) goto error; if ((rc = register_proc()) < 0) { unregister_device(); goto error; } if ((rc = snd_seq_oss_create_client()) < 0) { unregister_proc(); unregister_device(); goto error; } if ((rc = snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OSS, &ops, sizeof(struct snd_seq_oss_reg))) < 0) { snd_seq_oss_delete_client(); unregister_proc(); unregister_device(); goto error; } /* success */ snd_seq_oss_synth_init(); error: snd_seq_autoload_unlock(); return rc; }