[COMMON] fimc-is2: DO NOT use 'FIMC_IS_STREAM_COUNT' mingled with 'FIMC_IS_SENSOR_COUNT'
authorSanghoon Lee <shoon114.lee@samsung.com>
Tue, 26 Jun 2018 07:40:36 +0000 (16:40 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:05:30 +0000 (17:05 +0900)
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 <shoon114.lee@samsung.com>
12 files changed:
drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-ischain.c
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-hw-chain.c
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-hw-chain.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/actuator/fimc-is-actuator-ak7372.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l1.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l2.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l3.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3h1.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-4e6.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx260.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx320.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx333.c

index ee28546a71f2fa29a211b8ef6b5b04a1908ff21a..e650287abada466a7d71ff5fa38410c9ecda61f5 100644 (file)
@@ -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))
index 4fd3b2abc45ad5c3f4f60017d13eae688e158e36..2e58cb6ea3cb956141175a8adf7beb9bbe53d10f 100644 (file)
@@ -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++;
 
index 670a62920789dc6f2fcdeb45be8bf24ff526a4ed..f8d44c9f171dabd59c4f8f4be3237646d6b6ecc7 100644 (file)
@@ -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++;
 
index 2002f187a62994ac37509479aecc2ada3dd72bcd..53bf448ea3f01459dd94866d758ffdaeeaae0478 100644 (file)
@@ -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;
index e252a9a4c26124c3b2a50279ffcd0f23b1bdedef..4bcd4ab16f00ce23926c9b6a1967aaae519cfffa 100644 (file)
@@ -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;
index 7d99e2e6b737edf6cc7d4d1d52cd03dfa70f1486..aab6a792006fc9cb9ea0fe5ce2f64851830ce78c 100644 (file)
@@ -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;
index 47c5101222a58d7e71a54a5e4c57b6e73a3d7b1e..eb8fd7ac49a2c1b77f2a0e1bf023358ece5a6bd4 100644 (file)
@@ -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;
index 9a192a4d63ae836f149fc058310e33e72c0de77f..11de650a656afa8caf25e9c091be584e6f5566e4 100644 (file)
@@ -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;
index 06c025ad5c953811d398104d9a3309e43e23ffc9..9a328a661689c3e0ceda43eda150212ca162201a 100644 (file)
@@ -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;
index 90b4cd034e1b2db71926c7bb5c62e6ae75260c15..6543aa2aad4bd3230f86e5c1e9b41204c78bf6bf 100644 (file)
@@ -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;
index b8a412fbe487d64134bf7ed7b7ff2cec635dfb80..7e7848b6245f00151245a118120b2c41fe70bde2 100644 (file)
@@ -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;
index bea18204b75f8c733eb131750e8b882a7982e143..588613e634a28b8a6cd1876612847ee235c703b6 100644 (file)
@@ -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;