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: 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

authored by

Uwe Kleine-König and committed by
Takashi Iwai
505b57e5 376cdcd3

+5 -8
+5 -8
sound/drivers/opl4/opl4_seq.c
··· 118 118 snd_midi_channel_free_set(opl4->chset); 119 119 } 120 120 121 - static int snd_opl4_seq_probe(struct device *_dev) 121 + static int snd_opl4_seq_probe(struct snd_seq_device *dev) 122 122 { 123 - struct snd_seq_device *dev = to_seq_dev(_dev); 124 123 struct snd_opl4 *opl4; 125 124 int client; 126 125 struct snd_seq_port_callback pcallbacks; ··· 174 175 return 0; 175 176 } 176 177 177 - static int snd_opl4_seq_remove(struct device *_dev) 178 + static void snd_opl4_seq_remove(struct snd_seq_device *dev) 178 179 { 179 - struct snd_seq_device *dev = to_seq_dev(_dev); 180 180 struct snd_opl4 *opl4; 181 181 182 182 opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev); 183 183 if (!opl4) 184 - return -EINVAL; 184 + return; 185 185 186 186 if (opl4->seq_client >= 0) { 187 187 snd_seq_delete_kernel_client(opl4->seq_client); 188 188 opl4->seq_client = -1; 189 189 } 190 - return 0; 191 190 } 192 191 193 192 static struct snd_seq_driver opl4_seq_driver = { 193 + .probe = snd_opl4_seq_probe, 194 + .remove = snd_opl4_seq_remove, 194 195 .driver = { 195 196 .name = KBUILD_MODNAME, 196 - .probe = snd_opl4_seq_probe, 197 - .remove = snd_opl4_seq_remove, 198 197 }, 199 198 .id = SNDRV_SEQ_DEV_ID_OPL4, 200 199 .argsize = sizeof(struct snd_opl4 *),