Solve the problem of incompatible type 'struct timespec64'

touchscreen_mmi_gesture.c:196:4: error: passing 'struct timespec' to
parameter of incompatible type 'struct timespec64'.

Change-Id: Iab92d18c89766cfe510957e33e9fcd35290becfe
Reviewed-on: https://gerrit.mot.com/1993292
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
litong20 authored and litong committed 2021-06-27 22:14:05 -05:00
1 parent aa90e16b32
commit 4274b0c2a7
2 files changed
+9 -2

No files matched your search

+6
View File
@@ -35,4 +35,10 @@
#define SIGINFO siginfo
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0))
#define TIME_SPEC timespec64
#else
#define TIME_SPEC timespec
#endif
#endif /*_MMI_KERNEL_COMMON_H*/
+3 -2
View File
@@ -20,6 +20,7 @@
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/input.h>
#include <linux/mmi_kernel_common.h>
#if defined(CONFIG_PANEL_NOTIFICATIONS)
@@ -209,9 +210,9 @@ struct msm_drm_notifier *evdata = evd; \
#define NANO_TO_MSEC 1000000
static inline unsigned long long timediff_ms(
struct timespec64 start, struct timespec64 end)
struct TIME_SPEC start, struct TIME_SPEC end)
{
struct timespec64 temp;
struct TIME_SPEC temp;
if ((end.tv_nsec - start.tv_nsec) < 0) {
temp.tv_sec = end.tv_sec - start.tv_sec - 1;