Merge remote-tracking branch 'aosp/android-3.0' into develop-3.0-jb
[firefly-linux-kernel-4.4.55.git] / drivers / media / video / gc0307.c
index 8a62bba1619143c2e75ccf5a395f7bae222aca01..79c2ec36b6f41b8bcdd3ed1c7839ad62163d567f 100755 (executable)
@@ -109,7 +109,7 @@ static enum hrtimer_restart flash_off_func(struct hrtimer *timer);
 
 static struct  flash_timer flash_off_timer;
 //for user defined if user want to customize the series , zyc
-#if CONFIG_GC0307_USER_DEFINED_SERIES
+#ifdef CONFIG_GC0307_USER_DEFINED_SERIES
 #include "gc0307_user_series.c"
 #else
 /* init 640X480 VGA */
@@ -1749,7 +1749,6 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
        qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FLASH);
        if (qctrl)
         sensor->info_priv.flash = qctrl->default_value;
-       hrtimer_init(&(flash_off_timer.timer), CLOCK_MONOTONIC, HRTIMER_MODE_REL);
     flash_off_timer.icd = icd;
        flash_off_timer.timer.function = flash_off_func;
     #endif
@@ -3026,6 +3025,7 @@ static int sensor_probe(struct i2c_client *client,
         kfree(sensor);
                sensor = NULL;
     }
+       hrtimer_init(&(flash_off_timer.timer), CLOCK_MONOTONIC, HRTIMER_MODE_REL);
     SENSOR_DG("\n%s..%s..%d  ret = %x \n",__FUNCTION__,__FILE__,__LINE__,ret);
     return ret;
 }