diff options
| author | Uwe Kleine-König | 2025-12-09 13:38:48 +0100 |
|---|---|---|
| committer | Takashi Iwai | 2025-12-14 11:08:09 +0100 |
| commit | 4983d2f55f34748e64f22b514dd5fbfab1c6b0ad (patch) | |
| tree | 4f7c2e21d5c0ee7cc540b1ec09a0d1947766a695 /sound/isa | |
| parent | 505b57e52c9eeef810df23af6064aeb79b601f00 (diff) | |
ALSA: sb: 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/ccaf10073a6e8a68ea751bfc0e8aae1c66b57458.1765283601.git.u.kleine-koenig@baylibre.com
Diffstat (limited to 'sound/isa')
| -rw-r--r-- | sound/isa/sb/emu8000_synth.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/isa/sb/emu8000_synth.c b/sound/isa/sb/emu8000_synth.c index 9bec85ec55b4..3414c6d0695f 100644 --- a/sound/isa/sb/emu8000_synth.c +++ b/sound/isa/sb/emu8000_synth.c @@ -21,9 +21,8 @@ MODULE_LICENSE("GPL"); /* * create a new hardware dependent device for Emu8000 */ -static int snd_emu8000_probe(struct device *_dev) +static int snd_emu8000_probe(struct snd_seq_device *dev) { - struct snd_seq_device *dev = to_seq_dev(_dev); struct snd_emu8000 *hw; struct snd_emux *emu; @@ -81,13 +80,12 @@ static int snd_emu8000_probe(struct device *_dev) /* * free all resources */ -static int snd_emu8000_remove(struct device *_dev) +static void snd_emu8000_remove(struct snd_seq_device *dev) { - struct snd_seq_device *dev = to_seq_dev(_dev); struct snd_emu8000 *hw; if (dev->driver_data == NULL) - return 0; /* no synth was allocated actually */ + return; /* no synth was allocated actually */ hw = dev->driver_data; if (hw->pcm) @@ -96,7 +94,6 @@ static int snd_emu8000_remove(struct device *_dev) snd_util_memhdr_free(hw->memhdr); hw->emu = NULL; hw->memhdr = NULL; - return 0; } /* @@ -104,10 +101,10 @@ static int snd_emu8000_remove(struct device *_dev) */ static struct snd_seq_driver emu8000_driver = { + .probe = snd_emu8000_probe, + .remove = snd_emu8000_remove, .driver = { .name = KBUILD_MODNAME, - .probe = snd_emu8000_probe, - .remove = snd_emu8000_remove, }, .id = SNDRV_SEQ_DEV_ID_EMU8000, .argsize = sizeof(struct snd_emu8000 *), |
