Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
drivers/media/v4l2-core/v4l2-ioctl.c
··· 3028 3028 if (v4l2_is_known_ioctl(cmd)) { 3029 3029 info = &v4l2_ioctls[_IOC_NR(cmd)]; 3030 3030 3031 - if (!test_bit(_IOC_NR(cmd), vfd->valid_ioctls) && 3031 + if (!is_valid_ioctl(vfd, cmd) && 3032 3032 !((info->flags & INFO_FL_CTRL) && vfh && vfh->ctrl_handler)) 3033 3033 goto done; 3034 3034