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: emu10k1: 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/31d351fc844348eac0955db8db78c19a0c23d888.1765283601.git.u.kleine-koenig@baylibre.com

authored by

Uwe Kleine-König and committed by
Takashi Iwai
94afb5b7 4983d2f5

+5 -8
+5 -8
sound/pci/emu10k1/emu10k1_synth.c
··· 16 16 /* 17 17 * create a new hardware dependent device for Emu10k1 18 18 */ 19 - static int snd_emu10k1_synth_probe(struct device *_dev) 19 + static int snd_emu10k1_synth_probe(struct snd_seq_device *dev) 20 20 { 21 - struct snd_seq_device *dev = to_seq_dev(_dev); 22 21 struct snd_emux *emux; 23 22 struct snd_emu10k1 *hw; 24 23 struct snd_emu10k1_synth_arg *arg; ··· 63 64 return 0; 64 65 } 65 66 66 - static int snd_emu10k1_synth_remove(struct device *_dev) 67 + static void snd_emu10k1_synth_remove(struct snd_seq_device *dev) 67 68 { 68 - struct snd_seq_device *dev = to_seq_dev(_dev); 69 69 struct snd_emux *emux; 70 70 struct snd_emu10k1 *hw; 71 71 72 72 if (dev->driver_data == NULL) 73 - return 0; /* not registered actually */ 73 + return; /* not registered actually */ 74 74 75 75 emux = dev->driver_data; 76 76 ··· 80 82 } 81 83 82 84 snd_emux_free(emux); 83 - return 0; 84 85 } 85 86 86 87 /* ··· 87 90 */ 88 91 89 92 static struct snd_seq_driver emu10k1_synth_driver = { 93 + .probe = snd_emu10k1_synth_probe, 94 + .remove = snd_emu10k1_synth_remove, 90 95 .driver = { 91 96 .name = KBUILD_MODNAME, 92 - .probe = snd_emu10k1_synth_probe, 93 - .remove = snd_emu10k1_synth_remove, 94 97 }, 95 98 .id = SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, 96 99 .argsize = sizeof(struct snd_emu10k1_synth_arg),