From: Sanghoon Lee Date: Tue, 26 Jun 2018 07:40:36 +0000 (+0900) Subject: [COMMON] fimc-is2: DO NOT use 'FIMC_IS_STREAM_COUNT' mingled with 'FIMC_IS_SENSOR_COUNT' X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=39488b46ee6e2b9f7592d59a7205625572c308cc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: DO NOT use 'FIMC_IS_STREAM_COUNT' mingled with 'FIMC_IS_SENSOR_COUNT' To traverse the sensor device structure, sensor count define should be used to check the array length or to declare the related array. Change-Id: Iea9094ff143eedb7fff11b0c4e426d418240d0eb Signed-off-by: Sanghoon Lee --- diff --git a/drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-ischain.c b/drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-ischain.c index ee28546a71f2..e650287abada 100644 --- a/drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-ischain.c +++ b/drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-ischain.c @@ -2909,7 +2909,7 @@ static void interface_timer(unsigned long data) } } - for (i = 0; i < FIMC_IS_STREAM_COUNT; ++i) { + for (i = 0; i < FIMC_IS_SENSOR_COUNT; ++i) { sensor = &core->sensor[i]; if (!test_bit(FIMC_IS_SENSOR_BACK_START, &sensor->state)) diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-hw-chain.c b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-hw-chain.c index 4fd3b2abc45a..2e58cb6ea3cb 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-hw-chain.c +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-hw-chain.c @@ -521,7 +521,7 @@ int fimc_is_hw_ischain_cfg(void *ischain_data) csi = (struct fimc_is_device_csi *)v4l2_get_subdevdata(sensor->subdev_csi); /* checked single/dual camera */ - for (i = 0; i < FIMC_IS_STREAM_COUNT; i++) + for (i = 0; i < FIMC_IS_SENSOR_COUNT; i++) if (test_bit(FIMC_IS_SENSOR_OPEN, &(core->sensor[i].state))) sensor_cnt++; diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-hw-chain.c b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-hw-chain.c index 670a62920789..f8d44c9f171d 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-hw-chain.c +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-hw-chain.c @@ -531,7 +531,7 @@ int fimc_is_hw_ischain_cfg(void *ischain_data) FIMC_BUG(!csi); /* checked single/dual camera */ - for (i = 0; i < FIMC_IS_STREAM_COUNT; i++) + for (i = 0; i < FIMC_IS_SENSOR_COUNT; i++) if (test_bit(FIMC_IS_SENSOR_OPEN, &(core->sensor[i].state))) sensor_cnt++; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/actuator/fimc-is-actuator-ak7372.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/actuator/fimc-is-actuator-ak7372.c index 2002f187a629..53bf448ea3f0 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/actuator/fimc-is-actuator-ak7372.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/actuator/fimc-is-actuator-ak7372.c @@ -374,7 +374,7 @@ static int sensor_ak7372_actuator_probe(struct i2c_client *client, struct v4l2_subdev *subdev_actuator = NULL; struct fimc_is_actuator *actuator = NULL; struct fimc_is_device_sensor *device = NULL; - u32 sensor_id[FIMC_IS_STREAM_COUNT] = {0, }; + u32 sensor_id[FIMC_IS_SENSOR_COUNT] = {0, }; struct device *dev; struct device_node *dnode; const u32 *sensor_id_spec; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l1.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l1.c index e252a9a4c261..4bcd4ab16f00 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l1.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l1.c @@ -2064,7 +2064,7 @@ static int cis_2l1_probe(struct i2c_client *client, struct fimc_is_cis *cis = NULL; struct fimc_is_device_sensor *device = NULL; struct fimc_is_device_sensor_peri *sensor_peri = NULL; - u32 sensor_id[FIMC_IS_STREAM_COUNT] = {0, }; + u32 sensor_id[FIMC_IS_SENSOR_COUNT] = {0, }; u32 sensor_id_len; const u32 *sensor_id_spec; char const *setfile; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l2.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l2.c index 7d99e2e6b737..aab6a792006f 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l2.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l2.c @@ -2046,7 +2046,7 @@ static int cis_2l2_probe(struct i2c_client *client, struct fimc_is_cis *cis = NULL; struct fimc_is_device_sensor *device = NULL; struct fimc_is_device_sensor_peri *sensor_peri = NULL; - u32 sensor_id[FIMC_IS_STREAM_COUNT] = {0, }; + u32 sensor_id[FIMC_IS_SENSOR_COUNT] = {0, }; u32 sensor_id_len; const u32 *sensor_id_spec; char const *setfile; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l3.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l3.c index 47c5101222a5..eb8fd7ac49a2 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l3.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l3.c @@ -2880,7 +2880,7 @@ static int cis_2l3_probe(struct i2c_client *client, struct fimc_is_cis *cis = NULL; struct fimc_is_device_sensor *device = NULL; struct fimc_is_device_sensor_peri *sensor_peri = NULL; - u32 sensor_id[FIMC_IS_STREAM_COUNT] = {0, }; + u32 sensor_id[FIMC_IS_SENSOR_COUNT] = {0, }; u32 sensor_id_len; const u32 *sensor_id_spec; char const *setfile; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3h1.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3h1.c index 9a192a4d63ae..11de650a656a 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3h1.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3h1.c @@ -1717,7 +1717,7 @@ static int cis_3h1_probe(struct i2c_client *client, struct fimc_is_cis *cis = NULL; struct fimc_is_device_sensor *device = NULL; struct fimc_is_device_sensor_peri *sensor_peri = NULL; - u32 sensor_id[FIMC_IS_STREAM_COUNT] = {0, }; + u32 sensor_id[FIMC_IS_SENSOR_COUNT] = {0, }; u32 sensor_id_len; const u32 *sensor_id_spec; char const *setfile; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-4e6.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-4e6.c index 06c025ad5c95..9a328a661689 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-4e6.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-4e6.c @@ -1679,7 +1679,7 @@ static int cis_4e6_probe(struct i2c_client *client, struct fimc_is_cis *cis = NULL; struct fimc_is_device_sensor *device = NULL; struct fimc_is_device_sensor_peri *sensor_peri = NULL; - u32 sensor_id[FIMC_IS_STREAM_COUNT] = {0, }; + u32 sensor_id[FIMC_IS_SENSOR_COUNT] = {0, }; u32 sensor_id_len; const u32 *sensor_id_spec; char const *setfile; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx260.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx260.c index 90b4cd034e1b..6543aa2aad4b 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx260.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx260.c @@ -2153,7 +2153,7 @@ static int cis_imx260_probe(struct i2c_client *client, struct fimc_is_cis *cis = NULL; struct fimc_is_device_sensor *device = NULL; struct fimc_is_device_sensor_peri *sensor_peri = NULL; - u32 sensor_id[FIMC_IS_STREAM_COUNT] = {0, }; + u32 sensor_id[FIMC_IS_SENSOR_COUNT] = {0, }; u32 sensor_id_len; const u32 *sensor_id_spec; char const *setfile; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx320.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx320.c index b8a412fbe487..7e7848b6245f 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx320.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx320.c @@ -1942,7 +1942,7 @@ static int cis_imx320_probe(struct i2c_client *client, struct fimc_is_cis *cis = NULL; struct fimc_is_device_sensor *device = NULL; struct fimc_is_device_sensor_peri *sensor_peri = NULL; - u32 sensor_id[FIMC_IS_STREAM_COUNT] = {0, }; + u32 sensor_id[FIMC_IS_SENSOR_COUNT] = {0, }; u32 sensor_id_len; const u32 *sensor_id_spec; char const *setfile; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx333.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx333.c index bea18204b75f..588613e634a2 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx333.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx333.c @@ -2090,7 +2090,7 @@ static int cis_imx333_probe(struct i2c_client *client, struct fimc_is_cis *cis = NULL; struct fimc_is_device_sensor *device = NULL; struct fimc_is_device_sensor_peri *sensor_peri = NULL; - u32 sensor_id[FIMC_IS_STREAM_COUNT] = {0, }; + u32 sensor_id[FIMC_IS_SENSOR_COUNT] = {0, }; u32 sensor_id_len; const u32 *sensor_id_spec; char const *setfile;