summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-10-13 10:15:48 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-11-23 20:30:41 +0300
commit52c2575db8faa1d93227a92a32deb2cd66b96614 (patch)
treee70b797ba47efbefedaeb5304aed1c886a983140 /include/media
parentaeb18af18828f65eebb3dc475c62faab9cc8e9b6 (diff)
downloadlinux-52c2575db8faa1d93227a92a32deb2cd66b96614.tar.xz
media: v4l: subdev: Store the sub-device in the sub-device state
Store the sub-device in the sub-device state. This will be needed in e.g. validating pad number when retrieving information for non-stream-aware users. There are expected to be more needs for this in the future. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
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 8a345b5fa39d..46296852cb5b 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -749,6 +749,7 @@ struct v4l2_subdev_krouting {
*
* @_lock: default for 'lock'
* @lock: mutex for the state. May be replaced by the user.
+ * @sd: the sub-device which the state is related to
* @pads: &struct v4l2_subdev_pad_config array
* @routing: routing table for the subdev
* @stream_configs: stream configurations (only for V4L2_SUBDEV_FL_STREAMS)
@@ -761,6 +762,7 @@ struct v4l2_subdev_state {
/* lock for the struct v4l2_subdev_state fields */
struct mutex _lock;
struct mutex *lock;
+ struct v4l2_subdev *sd;
struct v4l2_subdev_pad_config *pads;
struct v4l2_subdev_krouting routing;
struct v4l2_subdev_stream_configs stream_configs;