aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2026-03-30 14:13:16 +0000
committerChristos Margiolis <christos@FreeBSD.org>2026-03-30 14:13:16 +0000
commit0efd33382504d3172734fa21325fcabef9c7f063 (patch)
tree5f9c0e682f1b0686a4117574884ea59ab7997915
parent40e8afadc393a102f4199228ae2047d3e6c71251 (diff)
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
-rw-r--r--sys/dev/sound/usb/uaudio.c5
-rw-r--r--sys/dev/sound/usb/uaudio_pcm.c13
2 files changed, 1 insertions, 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 int