mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
vl53l1: Make do_gettimeofday compatible to new Kernel version
do_gettimeofday is not supported in new Kernel version, redefine it if it is not supported for compatible compilation of stmvl53l1 DLKM module. Change-Id: I718eedf4d8cd8479f0d34fca8a78e7e1e39e49ec Signed-off-by: yanyh2 <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/1679227 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yuecai Liu <liuyc20@motorola.com> Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
33425953ea
commit
a0f5f44356
1 changed files with 10 additions and 0 deletions
|
|
@ -94,6 +94,16 @@
|
|||
|
||||
extern int stmvl53l1_enable_debug;
|
||||
|
||||
#ifndef do_gettimeofday
|
||||
#define do_gettimeofday(target_time, ...) \
|
||||
do { \
|
||||
struct timespec64 now_time; \
|
||||
ktime_get_real_ts64(&now_time); \
|
||||
(target_time)->tv_sec = now_time.tv_sec; \
|
||||
(target_time)->tv_usec = now_time.tv_nsec/1000; \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
# ifdef FORCE_CONSOLE_DEBUG
|
||||
#define vl53l1_dbgmsg(str, ...) do { \
|
||||
|
|
|
|||
Loading…
Reference in a new issue