mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2025-12-08 07:14:03 +00:00
Add support for kernel 4.14 (#61)
* Add support for kernel 4.14 'vfs_read' is no longer exported (see kernel commit https://github.com/torvalds/linux/commit/bd8df82be6). Update .travis.yml with newer kernels
This commit is contained in:
committed by
Carlos Garcés
parent
2eb28be744
commit
49a0fb5020
@@ -1910,10 +1910,12 @@ 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);
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||
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);
|
||||
#else
|
||||
rlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos);
|
||||
rlen = fp->f_op->read(fp, buf + sum, len - sum, &fp->f_pos);
|
||||
#endif
|
||||
if(rlen>0)
|
||||
sum+=rlen;
|
||||
|
||||
Reference in New Issue
Block a user