fimc-is2: fix sizeof pointer use
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / drivers / media / platform / exynos / fimc-is2 / sensor / module_framework / cis / fimc-is-cis-gm1sp.c
index 14d3fc2639232ddaa028e181d8ee51eedf30399e..70adfff9857694da2a6bc913fc3e404d11827449 100644 (file)
@@ -55,6 +55,7 @@ static const struct sensor_pll_info_compact **sensor_gm1sp_pllinfos;
 static u32 sensor_gm1sp_max_setfile_num;
 
 static const u32 *sensor_gm1sp_setfile_throttling;
+static u32 sensor_gm1sp_setfile_throttling_size;
 static const struct sensor_pll_info_compact *sensor_gm1sp_pllinfo_throttling;
 
 static void sensor_gm1sp_cis_data_calculation(const struct sensor_pll_info_compact *pll_info_compact, cis_shared_data *cis_data)
@@ -415,7 +416,7 @@ int sensor_gm1sp_cis_mode_change_throttling(struct v4l2_subdev *subdev)
        I2C_MUTEX_LOCK(cis->i2c_lock);
 
        ret = sensor_cis_set_registers(subdev, sensor_gm1sp_setfile_throttling,
-                               sizeof(sensor_gm1sp_setfile_throttling) / sizeof(sensor_gm1sp_setfile_throttling[0]));
+                               sensor_gm1sp_setfile_throttling_size);
        if (ret < 0) {
                err("sensor_gm1sp_set_registers fail!!");
                goto p_err;
@@ -1799,6 +1800,7 @@ static int cis_gm1sp_probe(struct i2c_client *client,
 
                /* throttling setting */
                sensor_gm1sp_setfile_throttling = sensor_gm1sp_setfile_B_4000x3000_15fps;
+               sensor_gm1sp_setfile_throttling_size = ARRAY_SIZE(sensor_gm1sp_setfile_B_4000x3000_15fps);
                sensor_gm1sp_pllinfo_throttling = &sensor_gm1sp_pllinfo_B_4000x3000_15fps;
        } else {
                err("%s setfile index out of bound, take default (setfile_A)", __func__);