Instead of vfs_read with kernel_read

TP:
Instead of vfs_read with kernel_read
8350 rebase Lahaina.LA.1.0.r1-00375-STD.PROD-1
kernel msm5.14 remove vfs_write EXPORT.

Change-Id: Ia6f45a744373eaf1a6facab0870a082e6d72b617
Reviewed-on: https://gerrit.mot.com/1732831
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
litong 2020-08-25 20:56:06 +08:00 • committed by litong20
commit 984e2d89fa

View file

@ -894,9 +894,13 @@ static int sec_ts_load_fw_from_ums(struct sec_ts_data *ts)
filp_close(fp, NULL);
goto open_err;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
nread = kernel_read(fp, (char __user *)fw_data,
fw_size, &fp->f_pos);
#else
nread = vfs_read(fp, (char __user *)fw_data,
fw_size, &fp->f_pos);
#endif
input_info(true, ts->dev,
"%s: start, file path %s, size %ld Bytes\n",
__func__, SEC_TS_DEFAULT_UMS_FW, fw_size);