summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Gorochowik <tgorochowik@antmicro.com>2018-05-21 14:54:50 +0200
committerStefan Agner <stefan.agner@toradex.com>2018-05-23 15:05:14 +0200
commit3c2f4472dacdf4b28dbab262fd46e24a13cc58ca (patch)
treef4a8969ea1ac33c40c9a1ba2ea339a5bcdfa1253
parent77bbbcfe3baaf26d84912b459150ec7a5138f7a7 (diff)
imx8: csi: Fix off-by-one error in sensors enumeration
Sensor ID counter starts from 0 while the actual device number starts from 1. Fix the issue that it caused. Without this fix it is impossible to make proper media pads connections.
-rw-r--r--drivers/media/platform/imx8/mxc-media-dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/imx8/mxc-media-dev.c b/drivers/media/platform/imx8/mxc-media-dev.c
index 6f5481d868af..2d484f81a8d7 100644
--- a/drivers/media/platform/imx8/mxc-media-dev.c
+++ b/drivers/media/platform/imx8/mxc-media-dev.c
@@ -190,7 +190,7 @@ static int mxc_md_create_links(struct mxc_md *mxc_md)
if (sensor == NULL || sensor->sd == NULL)
continue;
- mipi_csi2 = mxc_md->mipi_csi2[sensor->id];
+ mipi_csi2 = mxc_md->mipi_csi2[sensor->id + 1];
if (mipi_csi2 == NULL)
continue;