diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-02-07 12:03:30 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-02-16 13:46:32 +0300 |
commit | c464c2e3bbab3f341ddbd2f32a1c680b29f52f48 (patch) | |
tree | ab916706c8d23d90a74ec689b945112f667511d1 /drivers/media | |
parent | 619200d5fe14f5a6f28e36106ca9d9d5aae8a070 (diff) | |
download | linux-c464c2e3bbab3f341ddbd2f32a1c680b29f52f48.tar.xz |
media: core: v4l2-ioctl.c: use is_valid_ioctl()
In most cases the is_valid_ioctl() macro is used to check if an ioctl is
valid, except in one place. Use it there as well as it makes the code
easier to read.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 33076af4dfdb..6e7b8b682d13 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -3028,7 +3028,7 @@ static long __video_do_ioctl(struct file *file, if (v4l2_is_known_ioctl(cmd)) { info = &v4l2_ioctls[_IOC_NR(cmd)]; - if (!test_bit(_IOC_NR(cmd), vfd->valid_ioctls) && + if (!is_valid_ioctl(vfd, cmd) && !((info->flags & INFO_FL_CTRL) && vfh && vfh->ctrl_handler)) goto done; |