PM / devfreq: rk3399_dmc: rename driver and internals to rockchip
[firefly-linux-kernel-4.4.55.git] / drivers / media / video / ov2640_rk.c
index af72cf5e581dbce8141e19cc8584deb88e828569..0229d657090d85257578386e2bb1e16bed658a21 100755 (executable)
@@ -99,7 +99,7 @@ static enum hrtimer_restart flash_off_func(struct hrtimer *timer);
 \r
 static struct  flash_timer flash_off_timer;\r
 //for user defined if user want to customize the series , zyc\r
-#if CONFIG_OV2640_USER_DEFINED_SERIES\r
+#ifdef CONFIG_OV2640_USER_DEFINED_SERIES\r
 #include "ov2640_user_series.c"\r
 #else\r
 /* init 800*600 SVGA */\r
@@ -1775,7 +1775,6 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
        if (qctrl)\r
         sensor->info_priv.flash = qctrl->default_value;\r
 \r
-       hrtimer_init(&(flash_off_timer.timer), CLOCK_MONOTONIC, HRTIMER_MODE_REL);\r
     flash_off_timer.icd = icd;\r
        flash_off_timer.timer.function = flash_off_func;\r
     #endif\r
@@ -3079,6 +3078,7 @@ static int sensor_probe(struct i2c_client *client,
         kfree(sensor);\r
                sensor = NULL;\r
     }\r
+       hrtimer_init(&(flash_off_timer.timer), CLOCK_MONOTONIC, HRTIMER_MODE_REL);\r
     SENSOR_DG("\n%s..%s..%d  ret = %x \n",__FUNCTION__,__FILE__,__LINE__,ret);\r
     return ret;\r
 }\r