mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
media: ccs: Fix setting initial sub-device state
Fix setting sub-device state for non-source sub-devices.
Fixes: 5755be5f15 ("media: v4l2-subdev: Rename .init_cfg() operation to .init_state()")
Cc: stable@vger.kernel.org # for v6.8 and later
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
89bb7d3c40
commit
31e5191aa1
|
|
@ -2940,6 +2940,8 @@ static void ccs_cleanup(struct ccs_sensor *sensor)
|
|||
ccs_free_controls(sensor);
|
||||
}
|
||||
|
||||
static const struct v4l2_subdev_internal_ops ccs_internal_ops;
|
||||
|
||||
static int ccs_init_subdev(struct ccs_sensor *sensor,
|
||||
struct ccs_subdev *ssd, const char *name,
|
||||
unsigned short num_pads, u32 function,
|
||||
|
|
@ -2952,8 +2954,10 @@ static int ccs_init_subdev(struct ccs_sensor *sensor,
|
|||
if (!ssd)
|
||||
return 0;
|
||||
|
||||
if (ssd != sensor->src)
|
||||
if (ssd != sensor->src) {
|
||||
v4l2_subdev_init(&ssd->sd, &ccs_ops);
|
||||
ssd->sd.internal_ops = &ccs_internal_ops;
|
||||
}
|
||||
|
||||
ssd->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
ssd->sd.entity.function = function;
|
||||
|
|
@ -3062,6 +3066,10 @@ static const struct media_entity_operations ccs_entity_ops = {
|
|||
.link_validate = v4l2_subdev_link_validate,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_internal_ops ccs_internal_ops = {
|
||||
.init_state = ccs_init_state,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_internal_ops ccs_internal_src_ops = {
|
||||
.init_state = ccs_init_state,
|
||||
.registered = ccs_registered,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user