Revert "[COMMON] fimc-is2: add condition for flash S2MU106 initilize"
authorWooyeon Kim <wooy88.kim@samsung.com>
Tue, 19 Feb 2019 01:27:53 +0000 (10:27 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:55 +0000 (20:23 +0300)
This reverts commit 5e90c9d1b43945abac556eae216bfed8fccf57b5.

 PR JIRA ID: CPR-709

Change-Id: I630b6ad8482142a49068a7877be048685a609cd3
Signed-off-by: Wooyeon Kim <wooy88.kim@samsung.com>
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/flash/fimc-is-flash-s2mu106.c

index 7b0800255387a33aa9ed478ac2b385ddb618034a..3e7743b6658bdf93de8430081e266c8ad054bb00 100644 (file)
@@ -41,11 +41,6 @@ static int flash_s2mu106_init(struct v4l2_subdev *subdev, u32 val)
 
        FIMC_BUG(!flash);
 
-       for (i = 0; i < FLASH_LED_CH_MAX; i++) {
-               if (flash->led_ch[i] >= 0 && flash->flash_data.flash_fired)
-                       s2mu106_fled_set_mode_ctrl(flash->led_ch[i], CAM_FLASH_MODE_OFF);
-       }
-
        /* TODO: init flash driver */
        flash->flash_data.mode = CAM2_FLASH_MODE_OFF;
        flash->flash_data.intensity = 100; /* TODO: Need to figure out min/max range */
@@ -53,6 +48,11 @@ static int flash_s2mu106_init(struct v4l2_subdev *subdev, u32 val)
        flash->flash_data.flash_fired = false;
        flash->flash_data.cal_en = false;
 
+       for (i = 0; i < FLASH_LED_CH_MAX; i++) {
+               if (flash->led_ch[i] >= 0)
+                       s2mu106_fled_set_mode_ctrl(flash->led_ch[i], CAM_FLASH_MODE_OFF);
+       }
+
        return ret;
 }