diff --git a/drivers/input/touchscreen/ili9882_mmi/ili9882.h b/drivers/input/touchscreen/ili9882_mmi/ili9882.h index 4a250fbede4a..1d75fcb5c847 100755 --- a/drivers/input/touchscreen/ili9882_mmi/ili9882.h +++ b/drivers/input/touchscreen/ili9882_mmi/ili9882.h @@ -942,7 +942,7 @@ struct ilitek_ts_data { bool wq_bat_ctrl; bool panel_gesture_enable; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) bool netlink; #endif bool report; diff --git a/drivers/input/touchscreen/ili9882_mmi/ili9882_node.c b/drivers/input/touchscreen/ili9882_mmi/ili9882_node.c index 7b1bc274d782..c0221aa37609 100755 --- a/drivers/input/touchscreen/ili9882_mmi/ili9882_node.c +++ b/drivers/input/touchscreen/ili9882_mmi/ili9882_node.c @@ -1683,7 +1683,7 @@ static ssize_t ilitek_node_ioctl_write(struct file *filp, const char *buff, size } else if (strncmp(cmd, "gestureinfo", strlen(cmd)) == 0) { ilits->gesture_mode = DATA_FORMAT_GESTURE_INFO; ILI_INFO("gesture mode = %d\n", ilits->gesture_mode); -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) } else if (strncmp(cmd, "netlink", strlen(cmd)) == 0) { ilits->netlink = !ilits->netlink; ILI_INFO("netlink flag= %d\n", ilits->netlink); @@ -2195,7 +2195,7 @@ static long ilitek_node_ioctl(struct file *filp, unsigned int cmd, unsigned long ret = -ENOTTY; } break; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) case ILITEK_IOCTL_TP_NETLINK_CTRL: if (copy_from_user(szBuf, (u8 *) arg, 1)) { ILI_ERR("Failed to copy data from user space\n"); @@ -2626,7 +2626,7 @@ proc_node iliproc[] = { }; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) #define NETLINK_USER 21 static struct sock *netlink_skb; static struct nlmsghdr *netlink_head; @@ -2831,7 +2831,7 @@ void ili_node_init(void) ILI_INFO("Succeed to create %s under /proc\n", iliproc[i].name); } } -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) netlink_init(); #endif #ifndef CONFIG_INPUT_TOUCHSCREEN_MMI diff --git a/drivers/input/touchscreen/ili9882_mmi/ili9882_spi.c b/drivers/input/touchscreen/ili9882_mmi/ili9882_spi.c index 855d453c95e2..cf437f7045a4 100755 --- a/drivers/input/touchscreen/ili9882_mmi/ili9882_spi.c +++ b/drivers/input/touchscreen/ili9882_mmi/ili9882_spi.c @@ -735,7 +735,7 @@ static int ilitek_spi_probe(struct spi_device *spi) ilits->gesture_demo_ctrl = DISABLE; ilits->wtd_ctrl = OFF; ilits->report = ENABLE; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) ilits->netlink = DISABLE; #endif ilits->dnp = DISABLE; diff --git a/drivers/input/touchscreen/ili9882_mmi/ili9882_touch.c b/drivers/input/touchscreen/ili9882_mmi/ili9882_touch.c index cecc50d6d48b..3fb931d77697 100755 --- a/drivers/input/touchscreen/ili9882_mmi/ili9882_touch.c +++ b/drivers/input/touchscreen/ili9882_mmi/ili9882_touch.c @@ -832,7 +832,7 @@ static void ilitek_tddi_touch_send_debug_data(u8 *buf, int len) mutex_lock(&ilits->debug_mutex); -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) if (!ilits->netlink && !ilits->dnp) goto out;