]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
media: ti-vpe: cal: Replace number of ports numerical value by macro
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 6 Jul 2020 18:36:29 +0000 (20:36 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 08:31:54 +0000 (10:31 +0200)
Use the CAL_NUM_CSI2_PORTS macro instead of the hardcoded numerical
value 2 to iterate over the CSI-2 ports.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.c

index e57ee6010555501baf5dc0717f2aeca7caafdf74..617b1713307155ef0109f91068517b79dd693a84 100644 (file)
@@ -1281,7 +1281,7 @@ static irqreturn_t cal_irq(int irq_cal, void *data)
                if (status & CAL_HL_IRQ_OCPO_ERR_MASK)
                        dev_err_ratelimited(&cal->pdev->dev, "OCPO ERROR\n");
 
-               for (i = 0; i < 2; ++i) {
+               for (i = 0; i < CAL_NUM_CSI2_PORTS; ++i) {
                        if (status & CAL_HL_IRQ_CIO_MASK(i)) {
                                u32 cio_stat = reg_read(cal,
                                                        CAL_CSI2_COMPLEXIO_IRQSTATUS(i));