media: exynos4-is: Use global num_sensors rather than local index
authorJonathan Bakker <xc-racer2@live.ca>
Thu, 30 Jul 2020 23:01:09 +0000 (01:01 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 1 Sep 2020 12:13:25 +0000 (14:13 +0200)
commit401b463dac275a9159c80ce7061f8fe20ef892e5
treed653a149992bb6a019193509590b508b00982d6e
parent1068fe3aaf0ed96c7c141a07eca8f507d791fc78
media: exynos4-is: Use global num_sensors rather than local index

Instead of keeping a local copy of how many sensors we've probed
(which may not even properly represent the number of sensors
probed if we have a port without a sensor), use the global
num_sensors counter that has the actual number used.

This will also make it easier to add support for multiple sensors
being connected to the same port.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/exynos4-is/media-dev.c