[bionic,03/10] UBUNTU: SAUCE: ubuntu/rtl8821c: use kernel_read() instead of __vfs_read()
diff mbox series

Message ID 20180323164707.6027-4-jesse.sung@canonical.com
State New
Headers show
Series
  • Add drivers for RTL8821C WiFi and BT
Related show

Commit Message

Wen-chien Jesse Sung March 23, 2018, 4:47 p.m. UTC
BugLink: https://launchpad.net/bugs/1740231

The __vfs_read() is not exported any more.

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
 ubuntu/rtl8821c/os_dep/osdep_service.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Patch
diff mbox series

diff --git a/ubuntu/rtl8821c/os_dep/osdep_service.c b/ubuntu/rtl8821c/os_dep/osdep_service.c
index 02c70d9a0e11..500c26411a8a 100644
--- a/ubuntu/rtl8821c/os_dep/osdep_service.c
+++ b/ubuntu/rtl8821c/os_dep/osdep_service.c
@@ -2037,11 +2037,7 @@  static int readFile(struct file *fp, char *buf, int len)
 		return -EPERM;
 
 	while (sum < len) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
-		rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos);
-#else
-		rlen = fp->f_op->read(fp, buf + sum, len - sum, &fp->f_pos);
-#endif
+		rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
 		if (rlen > 0)
 			sum += rlen;
 		else if (0 != rlen)