mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-21 01:23:45 +08:00
Fixed vm_fault.
This commit is contained in:
committed by
Florian Pose
parent
538ff27265
commit
e2f864c921
+7
-3
@@ -62,7 +62,11 @@ static int eccdev_mmap(struct file *, struct vm_area_struct *);
|
||||
#define PAGE_FAULT_VERSION KERNEL_VERSION(2, 6, 23)
|
||||
|
||||
#if LINUX_VERSION_CODE >= PAGE_FAULT_VERSION
|
||||
static int eccdev_vma_fault(struct vm_area_struct *, struct vm_fault *);
|
||||
static int eccdev_vma_fault(
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
|
||||
struct vm_area_struct *,
|
||||
#endif
|
||||
struct vm_fault *);
|
||||
#else
|
||||
static struct page *eccdev_vma_nopage(
|
||||
struct vm_area_struct *, unsigned long, int *);
|
||||
@@ -278,8 +282,8 @@ static int eccdev_vma_fault(
|
||||
get_page(page);
|
||||
vmf->page = page;
|
||||
|
||||
EC_MASTER_DBG(priv->cdev->master, 1, "Vma fault, virtual_address = %p,"
|
||||
" offset = %lu, page = %p\n", vmf->virtual_address, offset, page);
|
||||
EC_MASTER_DBG(priv->cdev->master, 1, "Vma fault,"
|
||||
" offset = %lu, page = %p\n", offset, page);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user