frame_sync: replace the magic number with msecs_to_jiffies.
authorNanxin Qin <nanxin.qin@amlogic.com>
Wed, 6 Sep 2017 03:10:03 +0000 (11:10 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 6 Sep 2017 04:26:20 +0000 (21:26 -0700)
PD#150542: replace the magic number with msecs_to_jiffies.

Change-Id: I071da655a9ea3edf496fca65dc67167145ccc167
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
drivers/amlogic/media/frame_sync/tsync.c

index 7498ba7..4f42463 100644 (file)
@@ -647,7 +647,7 @@ static void tsync_state_switch_timer_fun(unsigned long arg)
                tsync_av_dynamic_timeout_ms =
                        jiffies_ms + tsync_av_dynamic_duration_ms;
        }
-       tsync_state_switch_timer.expires = jiffies + 20;
+       tsync_state_switch_timer.expires = jiffies + msecs_to_jiffies(200);
        add_timer(&tsync_state_switch_timer);
 }
 
@@ -1161,7 +1161,7 @@ void tsync_init(void)
 
        init_timer(&tsync_state_switch_timer);
        tsync_state_switch_timer.function = tsync_state_switch_timer_fun;
-       tsync_state_switch_timer.expires = jiffies + 1;
+       tsync_state_switch_timer.expires = jiffies + msecs_to_jiffies(10);
 
        add_timer(&tsync_state_switch_timer);
 }