/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to driver/compat.h

  • Committer: Suren A. Chilingaryan
  • Date: 2019-08-24 23:23:11 UTC
  • Revision ID: csa@suren.me-20190824232311-dgnk0ag1f1btgrfn
Due to active back-porting in Linux LTS branches, there are some comptaibility issues in the driver. This adds support for kernel 4.4.159

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
# define get_user_pages_compat(vma, nr, pages) get_user_pages(vma, nr, FOLL_WRITE, pages, NULL)
42
42
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
43
43
# define get_user_pages_compat(vma, nr, pages) get_user_pages(vma, nr, 1, 0, pages, NULL)
 
44
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,159))
 
45
    // Looks like some updates from 4.9 were backported to 4.4 LTS kernel. On Ubuntu, at least 4.4.159 needs this variant
 
46
# define get_user_pages_compat(vma, nr, pages) get_user_pages(current, current->mm, vma, nr, FOLL_WRITE, pages, NULL)
44
47
#else
45
48
# define get_user_pages_compat(vma, nr, pages) get_user_pages(current, current->mm, vma, nr, 1, 0, pages, NULL)
46
49
#endif