]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: seq: ump: Convert to snd_seq bus probe mechanism
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Tue, 9 Dec 2025 12:38:45 +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/054f1a0536228ccfe5f539ce854804f789f2ee64.1765283601.git.u.kleine-koenig@baylibre.com
sound/core/seq/seq_ump_client.c

index 27247babb16deebfbc3c9a57bf1ebc1252bf0152..a96d21981cbeecdd25d7e8fa61e60f2e162ed129 100644 (file)
@@ -452,9 +452,8 @@ static const struct snd_seq_ump_ops seq_ump_ops = {
 };
 
 /* create a sequencer client and ports for the given UMP endpoint */
-static int snd_seq_ump_probe(struct device *_dev)
+static int snd_seq_ump_probe(struct snd_seq_device *dev)
 {
-       struct snd_seq_device *dev = to_seq_dev(_dev);
        struct snd_ump_endpoint *ump = dev->private_data;
        struct snd_card *card = dev->card;
        struct seq_ump_client *client;
@@ -513,21 +512,19 @@ static int snd_seq_ump_probe(struct device *_dev)
 }
 
 /* remove a sequencer client */
-static int snd_seq_ump_remove(struct device *_dev)
+static void snd_seq_ump_remove(struct snd_seq_device *dev)
 {
-       struct snd_seq_device *dev = to_seq_dev(_dev);
        struct snd_ump_endpoint *ump = dev->private_data;
 
        if (ump->seq_client)
                seq_ump_client_free(ump->seq_client);
-       return 0;
 }
 
 static struct snd_seq_driver seq_ump_driver = {
+       .probe = snd_seq_ump_probe,
+       .remove = snd_seq_ump_remove,
        .driver = {
                .name = KBUILD_MODNAME,
-               .probe = snd_seq_ump_probe,
-               .remove = snd_seq_ump_remove,
        },
        .id = SNDRV_SEQ_DEV_ID_UMP,
        .argsize = 0,