Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Uwe Kleine-König and committed by
Takashi Iwai
4983d2f5 505b57e5

+5 -8
+5 -8
sound/isa/sb/emu8000_synth.c
··· 21 21 /* 22 22 * create a new hardware dependent device for Emu8000 23 23 */ 24 - static int snd_emu8000_probe(struct device *_dev) 24 + static int snd_emu8000_probe(struct snd_seq_device *dev) 25 25 { 26 - struct snd_seq_device *dev = to_seq_dev(_dev); 27 26 struct snd_emu8000 *hw; 28 27 struct snd_emux *emu; 29 28 ··· 80 81 /* 81 82 * free all resources 82 83 */ 83 - static int snd_emu8000_remove(struct device *_dev) 84 + static void snd_emu8000_remove(struct snd_seq_device *dev) 84 85 { 85 - struct snd_seq_device *dev = to_seq_dev(_dev); 86 86 struct snd_emu8000 *hw; 87 87 88 88 if (dev->driver_data == NULL) 89 - return 0; /* no synth was allocated actually */ 89 + return; /* no synth was allocated actually */ 90 90 91 91 hw = dev->driver_data; 92 92 if (hw->pcm) ··· 94 96 snd_util_memhdr_free(hw->memhdr); 95 97 hw->emu = NULL; 96 98 hw->memhdr = NULL; 97 - return 0; 98 99 } 99 100 100 101 /* ··· 101 104 */ 102 105 103 106 static struct snd_seq_driver emu8000_driver = { 107 + .probe = snd_emu8000_probe, 108 + .remove = snd_emu8000_remove, 104 109 .driver = { 105 110 .name = KBUILD_MODNAME, 106 - .probe = snd_emu8000_probe, 107 - .remove = snd_emu8000_remove, 108 111 }, 109 112 .id = SNDRV_SEQ_DEV_ID_EMU8000, 110 113 .argsize = sizeof(struct snd_emu8000 *),