master/cdev.c
branchstable-1.5
changeset 2682 8d6833867a56
parent 2681 9953c0d372ab
equal deleted inserted replaced
2681:9953c0d372ab 2682:8d6833867a56
    60  * vm_operations_struct is usable.
    60  * vm_operations_struct is usable.
    61  */
    61  */
    62 #define PAGE_FAULT_VERSION KERNEL_VERSION(2, 6, 23)
    62 #define PAGE_FAULT_VERSION KERNEL_VERSION(2, 6, 23)
    63 
    63 
    64 #if LINUX_VERSION_CODE >= PAGE_FAULT_VERSION
    64 #if LINUX_VERSION_CODE >= PAGE_FAULT_VERSION
    65 static int eccdev_vma_fault(struct vm_area_struct *, struct vm_fault *);
    65 static int eccdev_vma_fault(
       
    66 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
       
    67         struct vm_area_struct *,
       
    68 #endif
       
    69         struct vm_fault *);
    66 #else
    70 #else
    67 static struct page *eccdev_vma_nopage(
    71 static struct page *eccdev_vma_nopage(
    68         struct vm_area_struct *, unsigned long, int *);
    72         struct vm_area_struct *, unsigned long, int *);
    69 #endif
    73 #endif
    70 
    74 
   276     }
   280     }
   277 
   281 
   278     get_page(page);
   282     get_page(page);
   279     vmf->page = page;
   283     vmf->page = page;
   280 
   284 
   281     EC_MASTER_DBG(priv->cdev->master, 1, "Vma fault, virtual_address = %p,"
   285     EC_MASTER_DBG(priv->cdev->master, 1, "Vma fault,"
   282             " offset = %lu, page = %p\n", vmf->virtual_address, offset, page);
   286             " offset = %lu, page = %p\n", offset, page);
   283 
   287 
   284     return 0;
   288     return 0;
   285 }
   289 }
   286 
   290 
   287 #else
   291 #else