]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: v4l2-ioctl: Access v4l2_fh from private_data
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>
Sun, 10 Aug 2025 01:30:17 +0000 (04:30 +0300)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 13 Aug 2025 06:33:47 +0000 (08:33 +0200)
commitae76d82230844d8d7cbbcf3e3a9dd7228a7cb994
tree1700c4dfac481802e09ff7ebc25a9bd7a9e1d12a
parent6b79b21e7d2cfc5e31ce00869526f31ae0f93959
media: v4l2-ioctl: Access v4l2_fh from private_data

Now that it is guaranteed that file->private_data is set to point to the
'struct v4l2_fh' initialised by v4l2_fh_add() the v4l2-ioctl layer can
be modified to retrieve the v4l2_fh pointer from the file *.

As the __video_do_ioctl() function, that calls all the handlers modified
by this patch goes as:

static long __video_do_ioctl(struct file *file,
unsigned int cmd, void *arg)
{
void *fh = file->private_data;

...

ret = info->func(ops, file, fh, arg);

}

This patch introduces no functional changes and makes it possible to
remove in future the 'fh' argument to all ioctl handlers.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/v4l2-core/v4l2-ioctl.c