OSDN Git Service

media: imx: imx7-media-csi: Remove unneeded register read
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 10 Mar 2020 16:06:28 +0000 (17:06 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 12 Mar 2020 16:30:46 +0000 (17:30 +0100)
The imx7_csi_dma_reflash() function starts by reading the unrelated
register CSI_CSICR18 to then overwrite the read value with a read from
register CSI_CSICR3. This is likely due to a bad copy&paste, and is not
needed. Remove the extraneous read from register CSI_CSICR18.

Fixes: 9e5fa4e1e5b5b ("media: imx7-media-csi: Use u32 for storing register reads")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx7-media-csi.c

index 4692a3a..3e5faaf 100644 (file)
@@ -292,7 +292,7 @@ static void imx7_csi_hw_disable(struct imx7_csi *csi)
 
 static void imx7_csi_dma_reflash(struct imx7_csi *csi)
 {
-       u32 cr3 = imx7_csi_reg_read(csi, CSI_CSICR18);
+       u32 cr3;
 
        cr3 = imx7_csi_reg_read(csi, CSI_CSICR3);
        cr3 |= BIT_DMA_REFLASH_RFF;