diff --git a/include/linux/mmi_kernel_common.h b/include/linux/mmi_kernel_common.h index 2645eaad5dbc..d0e2e930ad40 100644 --- a/include/linux/mmi_kernel_common.h +++ b/include/linux/mmi_kernel_common.h @@ -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*/ diff --git a/include/linux/touchscreen_mmi.h b/include/linux/touchscreen_mmi.h index ad1ee50608e8..ec16ace9616c 100644 --- a/include/linux/touchscreen_mmi.h +++ b/include/linux/touchscreen_mmi.h @@ -20,6 +20,7 @@ #include #include #include +#include #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;