summaryrefslogtreecommitdiff
path: root/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-05-14 21:51:28 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-06-09 16:59:58 +0300
commit1ad997e83110d57af7dca8ccbb490e6c634ba46e (patch)
treefe4f95bd06fdf97268ffb7792921614ab88a1b4f /drivers/staging/media/atomisp/pci/atomisp_v4l2.c
parent1bb2a551e65bf35928432d1837e6d9287361704e (diff)
downloadlinux-1ad997e83110d57af7dca8ccbb490e6c634ba46e.tar.xz
media: atomisp: Drop MRFLD_PORT_NUM define
The info in the MRFLD_PORT_NUM define is duplicate with the ATOMISP_CAMERA_NR_PORTS and N_MIPI_PORT_ID enum values. Drop the MRFLD_PORT_NUM define and switch to N_MIPI_PORT_ID since the [sensor_]lanes arrays are in enum mipi_port_id order. Link: https://lore.kernel.org/r/20230518153733.195306-2-hdegoede@redhat.com Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp_v4l2.c')
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp_v4l2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index a76b60f8b411..b36dc98f897b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -701,7 +701,7 @@ int atomisp_csi_lane_config(struct atomisp_device *isp)
struct pci_dev *pdev = to_pci_dev(isp->dev);
static const struct {
u8 code;
- u8 lanes[MRFLD_PORT_NUM];
+ u8 lanes[N_MIPI_PORT_ID];
} portconfigs[] = {
/* Tangier/Merrifield available lane configurations */
{ 0x00, { 4, 1, 0 } }, /* 00000 */
@@ -725,7 +725,7 @@ int atomisp_csi_lane_config(struct atomisp_device *isp)
};
unsigned int i, j;
- u8 sensor_lanes[MRFLD_PORT_NUM] = { 0 };
+ u8 sensor_lanes[N_MIPI_PORT_ID] = { };
u32 csi_control;
int nportconfigs;
u32 port_config_mask;
@@ -782,12 +782,12 @@ int atomisp_csi_lane_config(struct atomisp_device *isp)
}
for (i = 0; i < nportconfigs; i++) {
- for (j = 0; j < MRFLD_PORT_NUM; j++)
+ for (j = 0; j < N_MIPI_PORT_ID; j++)
if (sensor_lanes[j] &&
sensor_lanes[j] != portconfigs[i].lanes[j])
break;
- if (j == MRFLD_PORT_NUM)
+ if (j == N_MIPI_PORT_ID)
break; /* Found matching setting */
}