diff options
| author | Sakari Ailus <[email protected]> | 2023-10-13 07:15:48 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2023-11-23 17:30:41 +0000 |
| commit | 52c2575db8faa1d93227a92a32deb2cd66b96614 (patch) | |
| tree | e70b797ba47efbefedaeb5304aed1c886a983140 /drivers/media/v4l2-core/v4l2-subdev.c | |
| parent | media: i2c: Fix references to pad config (diff) | |
| download | kernel-52c2575db8faa1d93227a92a32deb2cd66b96614.tar.gz kernel-52c2575db8faa1d93227a92a32deb2cd66b96614.zip | |
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 <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-subdev.c')
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-subdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index be86b906c985..cd3ff5b19d0c 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -1448,6 +1448,8 @@ __v4l2_subdev_state_alloc(struct v4l2_subdev *sd, const char *lock_name, else state->lock = &state->_lock; + state->sd = sd; + /* Drivers that support streams do not need the legacy pad config */ if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS) && sd->entity.num_pads) { state->pads = kvcalloc(sd->entity.num_pads, |
