mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacmn: Use ktime_get_real_ts64 for kernel 3.17.0+
ktime_get_real_ts64 is defined from kernel 3.17.0. Use ktime_get_real_ts64 instead of ktime_get_ts from kernel 3.17.0. Change-Id: Ica72545fe5224966fbb350813bf3c2d849946dbc CRs-Fixed: 2666404
This commit is contained in:
parent
5839296d1d
commit
1740435d49
1 changed files with 12 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -288,6 +288,16 @@ static inline uint64_t __qdf_get_log_timestamp(void)
|
|||
*
|
||||
* Return: system tick for non MSM platfroms
|
||||
*/
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0))
|
||||
static inline uint64_t __qdf_get_log_timestamp(void)
|
||||
{
|
||||
struct timespec64 ts;
|
||||
|
||||
ktime_get_real_ts64(&ts);
|
||||
|
||||
return ((uint64_t)ts.tv_sec * 1000000) + (ts.tv_nsec / 1000);
|
||||
}
|
||||
#else
|
||||
static inline uint64_t __qdf_get_log_timestamp(void)
|
||||
{
|
||||
struct timespec ts;
|
||||
|
|
@ -297,6 +307,7 @@ static inline uint64_t __qdf_get_log_timestamp(void)
|
|||
return ((uint64_t) ts.tv_sec * 1000000) + (ts.tv_nsec / 1000);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* __qdf_get_bootbased_boottime_ns() - Get the bootbased time in nanoseconds
|
||||
|
|
|
|||
Loading…
Reference in a new issue