diff --git a/driver/platform/osal/linux/osal_fileops.c b/driver/platform/osal/linux/osal_fileops.c index df127bf..f8a8672 100644 --- a/driver/platform/osal/linux/osal_fileops.c +++ b/driver/platform/osal/linux/osal_fileops.c @@ -94,7 +94,7 @@ static int klib_fwrite(const char *buf, unsigned long size, struct file *filp) old_fs = os_get_fs(); os_set_ds(); -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) writelen = vfs_write(filp, (void __user *)buf, size, &filp->f_pos); #else writelen = kernel_write(filp, (void __user *)buf, size, &filp->f_pos); @@ -117,7 +117,7 @@ static int klib_fread(char *buf, unsigned long size, struct file *filp) os_set_ds(); /* The cast to a user pointer is valid due to the set_fs() */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) readlen = vfs_read(filp, (void __user *)buf, size, &filp->f_pos); #else readlen = kernel_read(filp, (void __user *)buf, size, &filp->f_pos);