]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: emu10k1: Convert to snd_seq bus probe mechanism
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Tue, 9 Dec 2025 12:38:49 +0000 (13:38 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 14 Dec 2025 10:08:09 +0000 (11:08 +0100)
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 <u.kleine-koenig@baylibre.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/31d351fc844348eac0955db8db78c19a0c23d888.1765283601.git.u.kleine-koenig@baylibre.com
sound/pci/emu10k1/emu10k1_synth.c

index 662d20eb968928c3bf1cc24022d951a49acbb52e..26499c31eaa8a9b105d46337e13fd8d0bbc8bb35 100644 (file)
@@ -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),