TP: 1. Modify synaptics compile error on V(CR). 2. get_pid_task is more safer than pid_task, and get_pis_task in the whitelist of google Andorid 11. Change-Id: I7e6836db375bb8e80b6753afd400bb7db179cc18 Reviewed-on: https://gerrit.mot.com/1718097 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jichao Zou <zoujc@motorola.com> Submit-Approved: Jira Key
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
/* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef _MMI_KERNEL_COMMON_H
|
|
#define _MMI_KERNEL_COMMON_H
|
|
|
|
#include <linux/list.h>
|
|
#include <linux/version.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/time.h>
|
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
|
#define TIME_TYPE timespec64
|
|
#define GET_TIME_OF_DAY(_timeval) \
|
|
ktime_get_real_ts64(_timeval);
|
|
#else
|
|
#define TIME_TYPE timeval
|
|
#define GET_TIME_OF_DAY(_timeval) \
|
|
do_gettimeofday(_timeval);
|
|
|
|
#endif
|
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
|
#define SIGINFO kernel_siginfo
|
|
#else
|
|
#define SIGINFO siginfo
|
|
#endif
|
|
|
|
#endif /*_MMI_KERNEL_COMMON_H*/
|