git: 22730c4b10ba - main - sound: Remove unused "from" mixer_ioctl_cmd() argument
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 May 2026 15:33:30 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=22730c4b10ba391859a06966ea3e429aaf43cd09
commit 22730c4b10ba391859a06966ea3e429aaf43cd09
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-04-16 11:32:03 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-05-27 15:32:11 +0000
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
---
sys/dev/sound/pcm/dsp.c | 9 +++------
sys/dev/sound/pcm/mixer.c | 4 ++--
sys/dev/sound/pcm/mixer.h | 5 +----
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 0f76791448ca..bc92a3fbd530 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() */