media: v4l: subdev: Add len_routes field to struct v4l2_subdev_routing
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 31 Aug 2023 11:56:28 +0000 (14:56 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 29 Apr 2024 12:56:37 +0000 (14:56 +0200)
commit83a22a07cd9d51b7ffd18a8904e1857061eda28f
treedeaa96f6abfe58090f5e50476320fb79f82c5b47
parent38c84932de9cdef7472ff6ecf3214533ba517176
media: v4l: subdev: Add len_routes field to struct v4l2_subdev_routing

The len_routes field is used to tell the size of the routes array in
struct v4l2_subdev_routing. This way the number of routes returned from
S_ROUTING IOCTL may be larger than the number of routes provided, in case
there are more routes returned by the driver.

Note that this uAPI is still disabled in the code, so this change can
safely be done. Anyone who manually patched the code to enable this uAPI
must update their code.

The patch also increases the number of reserved fields in struct
v4l2_subdev_routing.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst
drivers/media/v4l2-core/v4l2-ioctl.c
drivers/media/v4l2-core/v4l2-subdev.c
include/media/v4l2-subdev.h
include/uapi/linux/v4l2-subdev.h