From 1ff031f032f408199485bad95db54ce6a91dd0c0 Mon Sep 17 00:00:00 2001 From: wangyq13 Date: Sun, 2 Oct 2022 13:00:56 +0800 Subject: [PATCH] input: nova_0flash_mmi: don't use kernel_read/write for 5.10 Don't use kernel_read/kernel_write for 5.10. Products use APK for factory test, apk writes result to csv file. So it's ok to delete kernel_read/write. Change-Id: Ib6671a3c7ca15468b99787f23359ddf2b58b525b Signed-off-by: wangyq13 Reviewed-on: https://gerrit.mot.com/2396128 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Reviewed-by: Jing Hu Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- .../input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c index 4dff2d77ff07..7420ffd3ac64 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c +++ b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c @@ -414,10 +414,10 @@ static int32_t nvt_save_rawdata_to_csv(int32_t *rawdata, uint8_t x_ch, uint8_t y output_len = y_ch * x_ch * 7 + y_ch * 2; #endif /* #if TOUCH_KEY_NUM > 0 */ pos = offset; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) - write_ret = kernel_write(fp, (char __user *)fbufp, output_len, &pos); -#else +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) write_ret = vfs_write(fp, (char __user *)fbufp, output_len, &pos); +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) + write_ret = kernel_write(fp, (char __user *)fbufp, output_len, &pos); #endif if (write_ret <= 0) { NVT_ERR("write %s failed\n", file_path);