aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2026-04-16 11:32:03 +0000
committerChristos Margiolis <christos@FreeBSD.org>2026-06-03 08:22:24 +0000
commitde5502ed01c805320841a25643c1dd8958306d88 (patch)
tree095cc1de217f514fe80f8a299e7baef5e7db25d7
parentf94bb91ac69cdca93535349f3739d1ac76cd863d (diff)
sound: Remove unused "from" mixer_ioctl_cmd() argument
Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18 (cherry picked from commit 22730c4b10ba391859a06966ea3e429aaf43cd09)
-rw-r--r--sys/dev/sound/pcm/dsp.c9
-rw-r--r--sys/dev/sound/pcm/mixer.c4
-rw-r--r--sys/dev/sound/pcm/mixer.h5
3 files changed, 6 insertions, 12 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 82c960fc3b40..8a2ce2422bef 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -728,8 +728,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
if (d->mixer_dev != NULL) {
PCM_ACQUIRE_QUICK(d);
- ret = mixer_ioctl_cmd(d->mixer_dev, cmd, arg, -1, td,
- MIXER_CMD_DIRECT);
+ ret = mixer_ioctl_cmd(d->mixer_dev, cmd, arg, -1, td);
PCM_RELEASE_QUICK(d);
} else
ret = EBADF;
@@ -1526,8 +1525,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
if (d->mixer_dev != NULL) {
PCM_ACQUIRE_QUICK(d);
- ret = mixer_ioctl_cmd(d->mixer_dev, xcmd, arg, -1, td,
- MIXER_CMD_DIRECT);
+ ret = mixer_ioctl_cmd(d->mixer_dev, xcmd, arg, -1, td);
PCM_RELEASE_QUICK(d);
} else
ret = ENOTSUP;
@@ -1539,8 +1537,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
case SNDCTL_DSP_SET_RECSRC:
if (d->mixer_dev != NULL) {
PCM_ACQUIRE_QUICK(d);
- ret = mixer_ioctl_cmd(d->mixer_dev, cmd, arg, -1, td,
- MIXER_CMD_DIRECT);
+ ret = mixer_ioctl_cmd(d->mixer_dev, cmd, arg, -1, td);
PCM_RELEASE_QUICK(d);
} else
ret = ENOTSUP;
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index d73361fe7e16..73d1b5870b83 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -1044,7 +1044,7 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
PCM_GIANT_ENTER(d);
PCM_ACQUIRE_QUICK(d);
- ret = mixer_ioctl_cmd(i_dev, cmd, arg, mode, td, MIXER_CMD_CDEV);
+ ret = mixer_ioctl_cmd(i_dev, cmd, arg, mode, td);
PCM_RELEASE_QUICK(d);
PCM_GIANT_LEAVE(d);
@@ -1067,7 +1067,7 @@ mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi)
*/
int
mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
- struct thread *td, int from)
+ struct thread *td)
{
struct snd_mixer *m;
int ret = EINVAL, *arg_i = (int *)arg;
diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h
index 3ce8a4f5adee..4ced76082e31 100644
--- a/sys/dev/sound/pcm/mixer.h
+++ b/sys/dev/sound/pcm/mixer.h
@@ -36,7 +36,7 @@ int mixer_delete(struct snd_mixer *m);
int mixer_init(device_t dev, kobj_class_t cls, void *devinfo);
int mixer_uninit(device_t dev);
int mixer_reinit(device_t dev);
-int mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td, int from);
+int mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td);
int mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi);
int mixer_hwvol_init(device_t dev);
@@ -63,9 +63,6 @@ u_int32_t mix_getparent(struct snd_mixer *m, u_int32_t dev);
void *mix_getdevinfo(struct snd_mixer *m);
struct mtx *mixer_get_lock(struct snd_mixer *m);
-#define MIXER_CMD_DIRECT 0 /* send command within driver */
-#define MIXER_CMD_CDEV 1 /* send command from cdev/ioctl */
-
#define MIXER_TYPE_PRIMARY 0 /* mixer_init() */
#define MIXER_TYPE_SECONDARY 1 /* mixer_create() */