Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: i2c: ds90ub913: Stop accessing streams configs directly

The v4l2_subdev_stream_config structure will be made private. Stop
accessing it directly, iterate over routes instead to initialize
formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Laurent Pinchart and committed by
Hans Verkuil
adc276c4 955c993d

+9 -8
+9 -8
drivers/media/i2c/ds90ub913.c
··· 333 333 .quantization = V4L2_QUANTIZATION_LIM_RANGE, 334 334 .xfer_func = V4L2_XFER_FUNC_SRGB, 335 335 }; 336 - struct v4l2_subdev_stream_configs *stream_configs; 337 - unsigned int i; 336 + struct v4l2_subdev_route *route; 338 337 int ret; 339 338 340 339 ret = v4l2_subdev_routing_validate(sd, routing, ··· 345 346 if (ret) 346 347 return ret; 347 348 348 - stream_configs = &state->stream_configs; 349 + for_each_active_route(&state->routing, route) { 350 + struct v4l2_mbus_framefmt *fmt; 349 351 350 - for (i = 0; i < stream_configs->num_configs; i++) { 351 - if (stream_configs->configs[i].pad == UB913_PAD_SINK) 352 - stream_configs->configs[i].fmt = in_format; 353 - else 354 - stream_configs->configs[i].fmt = out_format; 352 + fmt = v4l2_subdev_state_get_format(state, route->sink_pad, 353 + route->sink_stream); 354 + *fmt = in_format; 355 + fmt = v4l2_subdev_state_get_format(state, route->source_pad, 356 + route->source_stream); 357 + *fmt = out_format; 355 358 } 356 359 357 360 return 0;