]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: v4l2-ioctl: Stop passing fh pointer to ioctl handlers
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sun, 10 Aug 2025 01:30:51 +0000 (04:30 +0300)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 13 Aug 2025 06:33:56 +0000 (08:33 +0200)
commit0f1a7facb64abe5104c3eb235824ea8d6296474d
treeb73892fd8a8038995eecd09693c51895bd24bfed
parentd2683099c456c82894d214175862a14bc13bbd09
media: v4l2-ioctl: Stop passing fh pointer to ioctl handlers

Now that all drivers access the v4l2_fh from the file structure, there
is no need to pass it as an explicit argument to ioctl handlers. Set the
argument to NULL in the __video_do_ioctl() function, and rename the 'fh'
argument in the ioctl handler declarations to 'priv' indicate it does
not contain a file handle.

The argument could be removed altogether with a mechanical change
(probably using coccinelle), but there are plans to pass a new argument
to the ioctl handlers in the near future. The tree-wide change to remove
the argument, only to add another one soon after, would be too much
churn.

While at it, fix argument alignment in vidioc_try_fmt_vid_out_overlay().

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/v4l2-core/v4l2-compat-ioctl32.c
drivers/media/v4l2-core/v4l2-ioctl.c
include/media/v4l2-ioctl.h