/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: 2017-06-14 01:33:43 UTC
  • Revision ID: csa@suren.me-20170614013343-u5en58l91ihj6zg8
Support kernels up to 4.9 (patch provided by Timo)

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
# define __devinitdata
38
38
#endif
39
39
 
 
40
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
 
41
# define get_user_pages_compat(vma, nr, pages) get_user_pages(vma, nr, FOLL_WRITE, pages, NULL)
 
42
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
 
43
# define get_user_pages_compat(vma, nr, pages) get_user_pages(vma, nr, 1, 0, pages, NULL)
 
44
#else
 
45
# define get_user_pages_compat(vma, nr, pages) get_user_pages(current, current->mm, vma, nr, 1, 0, pages, NULL)
 
46
#endif
 
47
 
 
48
 
40
49
#endif