From 1644c2d5762a526b5441e3dc1b307ba1ef8e17fd Mon Sep 17 00:00:00 2001 From: Steve Jeong Date: Wed, 19 Jul 2023 10:28:58 +0900 Subject: [PATCH] os_dep/osdep_service.c: improve code Signed-off-by: Steve Jeong --- os_dep/osdep_service.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index d772767..7733464 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -2428,7 +2428,6 @@ static int readFile(struct file *fp, char *buf, int len) while (sum < len) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) - MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver); rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)) rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos); @@ -2460,7 +2459,6 @@ static int writeFile(struct file *fp, char *buf, int len) while (sum < len) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) - MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver); wlen = kernel_write(fp, buf + sum, len - sum, &fp->f_pos); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)) wlen = __vfs_write(fp, buf + sum, len - sum, &fp->f_pos); @@ -3535,3 +3533,4 @@ int hwaddr_aton_i(const char *txt, u8 *addr) return 0; } +MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);