mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
media: vimc: Don't iterate over single pad
The .init_state() operations of the debayer and sensor entities iterate over the entity's pads. In practice, the iteration covers a single pad only. Access the pad directly and remove the loops. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
b6ee5ac184
commit
2ef9a1e722
@@ -44,14 +44,10 @@ static const struct v4l2_mbus_framefmt fmt_default = {
|
||||
static int vimc_sensor_init_state(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state)
|
||||
{
|
||||
unsigned int i;
|
||||
struct v4l2_mbus_framefmt *mf;
|
||||
|
||||
for (i = 0; i < sd->entity.num_pads; i++) {
|
||||
struct v4l2_mbus_framefmt *mf;
|
||||
|
||||
mf = v4l2_subdev_state_get_format(sd_state, i);
|
||||
*mf = fmt_default;
|
||||
}
|
||||
mf = v4l2_subdev_state_get_format(sd_state, 0);
|
||||
*mf = fmt_default;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user