1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-09 23:57:00 +00:00

Minor cleanup to Kernel v4.14 Support

This commit is contained in:
Christian B 2017-11-15 20:07:10 +01:00 committed by GitHub
parent 3e70835ef0
commit 8c2fe69b29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1919,12 +1919,10 @@ static int readFile(struct file *fp, char *buf, int len)
return -EPERM;
while (sum < len) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
#else
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos);
#endif
#else
rlen = fp->f_op->read(fp, buf + sum, len - sum, &fp->f_pos);
#endif