[COMMON] fimc-is2: use valid frame pointer for internal subdevs
authorJeongtae Park <jtp.park@samsung.com>
Tue, 12 Jun 2018 12:36:15 +0000 (21:36 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:05:12 +0000 (17:05 +0900)
Change-Id: If3e2ef8ef676d6b7baa0dac2f36e3dc50a29f8a1
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c

index efac920c002f6e6e963975ee144125c7ab61994f..248002d4ce3cf89a1708d540bd77b6749ec869d8 100644 (file)
@@ -1115,12 +1115,9 @@ static int fimc_is_sensor_notify_by_fstr(struct fimc_is_device_sensor *device, v
                                framemgr_x_barrier(framemgr, 0);
                                return -EINVAL;
                        }
-                       frameptr = ctrl.value;
-
-                       if (frameptr < framemgr->num_frames) {
-                               frame = &framemgr->frames[frameptr];
-                               frame->fcount = device->fcount;
-                       }
+                       frameptr = (ctrl.value + 1) % framemgr->num_frames;
+                       frame = &framemgr->frames[frameptr];
+                       frame->fcount = device->fcount;
                }
 
                framemgr_x_barrier(framemgr, 0);