summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>2025-12-09 15:38:47 +0300
committerTakashi Iwai <tiwai@suse.de>2025-12-14 13:08:09 +0300
commit505b57e52c9eeef810df23af6064aeb79b601f00 (patch)
tree33107583db44142dd558e37924efee3625a7706c
parent376cdcd3ff18c08540178bc95e1dba49228cd2bd (diff)
downloadlinux-505b57e52c9eeef810df23af6064aeb79b601f00.tar.xz
ALSA: opl4: 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 <u.kleine-koenig@baylibre.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/15cd19c9c8ec32e92b956eec112e515335bc22cf.1765283601.git.u.kleine-koenig@baylibre.com
-rw-r--r--sound/drivers/opl4/opl4_seq.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c
index 7bb22089a093..fd6f15be6109 100644
--- a/sound/drivers/opl4/opl4_seq.c
+++ b/sound/drivers/opl4/opl4_seq.c
@@ -118,9 +118,8 @@ static void snd_opl4_seq_free_port(void *private_data)
snd_midi_channel_free_set(opl4->chset);
}
-static int snd_opl4_seq_probe(struct device *_dev)
+static int snd_opl4_seq_probe(struct snd_seq_device *dev)
{
- struct snd_seq_device *dev = to_seq_dev(_dev);
struct snd_opl4 *opl4;
int client;
struct snd_seq_port_callback pcallbacks;
@@ -175,27 +174,25 @@ static int snd_opl4_seq_probe(struct device *_dev)
return 0;
}
-static int snd_opl4_seq_remove(struct device *_dev)
+static void snd_opl4_seq_remove(struct snd_seq_device *dev)
{
- struct snd_seq_device *dev = to_seq_dev(_dev);
struct snd_opl4 *opl4;
opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
if (!opl4)
- return -EINVAL;
+ return;
if (opl4->seq_client >= 0) {
snd_seq_delete_kernel_client(opl4->seq_client);
opl4->seq_client = -1;
}
- return 0;
}
static struct snd_seq_driver opl4_seq_driver = {
+ .probe = snd_opl4_seq_probe,
+ .remove = snd_opl4_seq_remove,
.driver = {
.name = KBUILD_MODNAME,
- .probe = snd_opl4_seq_probe,
- .remove = snd_opl4_seq_remove,
},
.id = SNDRV_SEQ_DEV_ID_OPL4,
.argsize = sizeof(struct snd_opl4 *),