Date: Mon, 30 Mar 2026 14:13:24 +0000 From: Christos Margiolis <christos@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 0efd33382504 - main - snd_uaudio: Retire sndcard_func usage Message-ID: <69ca8504.2609c.5ed38d62@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0efd33382504d3172734fa21325fcabef9c7f063 commit 0efd33382504d3172734fa21325fcabef9c7f063 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2026-03-30 14:13:16 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2026-03-30 14:13:16 +0000 snd_uaudio: Retire sndcard_func usage This is effectively a no-op, as it does not make use of the sndcard_func->varinfo field, so eventually ua_probe() always succeeds. Also change ua_probe()'s value to 0. There is no need to return BUS_PROBE_DEFAULT, because snd_uaudio() attaches the sound(4)'s children with bus_attach_children(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56160 --- sys/dev/sound/usb/uaudio.c | 5 ----- sys/dev/sound/usb/uaudio_pcm.c | 13 +------------ 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index dd8aa8c9fafe..65976ced8a75 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -367,7 +367,6 @@ struct uaudio_softc_child { }; struct uaudio_softc { - struct sndcard_func sc_sndcard_func; struct uaudio_chan sc_rec_chan[UAUDIO_MAX_CHILD]; struct uaudio_chan sc_play_chan[UAUDIO_MAX_CHILD]; struct umidi_chan sc_midi_chan; @@ -1112,8 +1111,6 @@ uaudio_attach(device_t dev) /* attach the children */ - sc->sc_sndcard_func.func = SCF_PCM; - /* * Only attach a PCM device if we have a playback, recording * or mixer device present: @@ -1130,8 +1127,6 @@ uaudio_attach(device_t dev) DPRINTF("out of memory\n"); goto detach; } - device_set_ivars(sc->sc_child[i].pcm_device, - &sc->sc_sndcard_func); } bus_attach_children(dev); diff --git a/sys/dev/sound/usb/uaudio_pcm.c b/sys/dev/sound/usb/uaudio_pcm.c index 0b3da9b20440..c24c111f983c 100644 --- a/sys/dev/sound/usb/uaudio_pcm.c +++ b/sys/dev/sound/usb/uaudio_pcm.c @@ -190,18 +190,7 @@ MIXER_DECLARE(ua_mixer); static int ua_probe(device_t dev) { - struct sndcard_func *func; - - /* the parent device has already been probed */ - - func = device_get_ivars(dev); - - if ((func == NULL) || - (func->func != SCF_PCM)) { - return (ENXIO); - } - - return (BUS_PROBE_DEFAULT); + return (0); } static inthome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ca8504.2609c.5ed38d62>
