summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-08-31 14:56:28 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-04-29 14:56:37 +0200
commit83a22a07cd9d51b7ffd18a8904e1857061eda28f (patch)
treedeaa96f6abfe58090f5e50476320fb79f82c5b47 /include/media
parent38c84932de9cdef7472ff6ecf3214533ba517176 (diff)
downloadlinux-stable-83a22a07cd9d51b7ffd18a8904e1857061eda28f.tar.gz
linux-stable-83a22a07cd9d51b7ffd18a8904e1857061eda28f.tar.bz2
linux-stable-83a22a07cd9d51b7ffd18a8904e1857061eda28f.zip
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>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-subdev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index e22c50ce7e05..e30c463d90e5 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -714,12 +714,14 @@ struct v4l2_subdev_stream_configs {
/**
* struct v4l2_subdev_krouting - subdev routing table
*
+ * @len_routes: length of routes array, in routes
* @num_routes: number of routes
* @routes: &struct v4l2_subdev_route
*
* This structure contains the routing table for a subdev.
*/
struct v4l2_subdev_krouting {
+ unsigned int len_routes;
unsigned int num_routes;
struct v4l2_subdev_route *routes;
};