/* register new midi synth port */
static int
-snd_seq_midisynth_probe(struct device *_dev)
+snd_seq_midisynth_probe(struct snd_seq_device *dev)
{
- struct snd_seq_device *dev = to_seq_dev(_dev);
struct seq_midisynth_client *client;
struct seq_midisynth *msynth, *ms;
struct snd_seq_port_info *port __free(kfree) = NULL;
}
/* release midi synth port */
-static int
-snd_seq_midisynth_remove(struct device *_dev)
+static void
+snd_seq_midisynth_remove(struct snd_seq_device *dev)
{
- struct snd_seq_device *dev = to_seq_dev(_dev);
struct seq_midisynth_client *client;
struct seq_midisynth *msynth;
struct snd_card *card = dev->card;
guard(mutex)(®ister_mutex);
client = synths[card->number];
if (client == NULL || client->ports[device] == NULL)
- return -ENODEV;
+ return;
ports = client->ports_per_device[device];
client->ports_per_device[device] = 0;
msynth = client->ports[device];
synths[card->number] = NULL;
kfree(client);
}
- return 0;
}
static struct snd_seq_driver seq_midisynth_driver = {
+ .probe = snd_seq_midisynth_probe,
+ .remove = snd_seq_midisynth_remove,
.driver = {
.name = KBUILD_MODNAME,
- .probe = snd_seq_midisynth_probe,
- .remove = snd_seq_midisynth_remove,
},
.id = SNDRV_SEQ_DEV_ID_MIDISYNTH,
.argsize = 0,