diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-07-06 20:36:29 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-07-19 10:31:54 +0200 |
commit | a0db060fb100c16b533595f468ed57ba4bb2d5a3 (patch) | |
tree | f6d40481ca85bc78dbc8f187f322a9132d4ec794 /drivers/media | |
parent | 7e75b1502f65d70088f522cb4474502644b44428 (diff) | |
download | lwn-a0db060fb100c16b533595f468ed57ba4bb2d5a3.tar.gz lwn-a0db060fb100c16b533595f468ed57ba4bb2d5a3.zip |
media: ti-vpe: cal: Replace number of ports numerical value by macro
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/ti-vpe/cal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index e57ee6010555..617b17133071 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -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)); |