From: Uwe Kleine-König Date: Tue, 9 Dec 2025 12:38:49 +0000 (+0100) Subject: ALSA: emu10k1: Convert to snd_seq bus probe mechanism X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94afb5b7a130f3842baf0aa1fd936b2c7d73cbbd;p=thirdparty%2Fkernel%2Flinux.git ALSA: emu10k1: Convert to snd_seq bus probe mechanism The snd_seq bus got a dedicated probe function. Make use of that. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Signed-off-by: Uwe Kleine-König Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/31d351fc844348eac0955db8db78c19a0c23d888.1765283601.git.u.kleine-koenig@baylibre.com --- diff --git a/sound/pci/emu10k1/emu10k1_synth.c b/sound/pci/emu10k1/emu10k1_synth.c index 662d20eb96892..26499c31eaa8a 100644 --- a/sound/pci/emu10k1/emu10k1_synth.c +++ b/sound/pci/emu10k1/emu10k1_synth.c @@ -16,9 +16,8 @@ MODULE_LICENSE("GPL"); /* * create a new hardware dependent device for Emu10k1 */ -static int snd_emu10k1_synth_probe(struct device *_dev) +static int snd_emu10k1_synth_probe(struct snd_seq_device *dev) { - struct snd_seq_device *dev = to_seq_dev(_dev); struct snd_emux *emux; struct snd_emu10k1 *hw; struct snd_emu10k1_synth_arg *arg; @@ -64,14 +63,13 @@ static int snd_emu10k1_synth_probe(struct device *_dev) return 0; } -static int snd_emu10k1_synth_remove(struct device *_dev) +static void snd_emu10k1_synth_remove(struct snd_seq_device *dev) { - struct snd_seq_device *dev = to_seq_dev(_dev); struct snd_emux *emux; struct snd_emu10k1 *hw; if (dev->driver_data == NULL) - return 0; /* not registered actually */ + return; /* not registered actually */ emux = dev->driver_data; @@ -82,7 +80,6 @@ static int snd_emu10k1_synth_remove(struct device *_dev) } snd_emux_free(emux); - return 0; } /* @@ -90,10 +87,10 @@ static int snd_emu10k1_synth_remove(struct device *_dev) */ static struct snd_seq_driver emu10k1_synth_driver = { + .probe = snd_emu10k1_synth_probe, + .remove = snd_emu10k1_synth_remove, .driver = { .name = KBUILD_MODNAME, - .probe = snd_emu10k1_synth_probe, - .remove = snd_emu10k1_synth_remove, }, .id = SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, .argsize = sizeof(struct snd_emu10k1_synth_arg),