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 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2396128
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <lvxj4@motorola.com>
Reviewed-by: Jing Hu <hujing3@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wangyq13 2022-10-02 13:00:56 +08:00 • committed by Yeqing Wang
commit 1ff031f032

View file

@ -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);