media: rcar-vin: Use correct count of remote subdevices
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Fri, 13 Jun 2025 15:34:22 +0000 (17:34 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Mon, 16 Jun 2025 06:52:14 +0000 (08:52 +0200)
commit1b83fa6eb9706be4023bce88e952902acf8646ba
treecf9df46131acd3dfd7607badbc7a17775756badf
parent40823233ca30b89af8e5ccd58effddb997c98fb5
media: rcar-vin: Use correct count of remote subdevices

When extending the driver with Gen4 support the iteration of over
possible remote subdevices changed from being R-Car CSI-2 Rx only to
also cover R-Car CSISP instances. In two loops updating the bounds
variable was missed.

This had no ill effect as the count the two values have always been the
same in the past. Fix it by looking at the array size.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20250613153434.2001800-2-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/renesas/rcar-vin/rcar-core.c