]> git.pld-linux.org Git - packages/xorg-driver-video-fglrx.git/blob - linux-4.6.patch
- fix building with linux 4.6
[packages/xorg-driver-video-fglrx.git] / linux-4.6.patch
1 --- xorg-driver-video-fglrx-15.12/common/lib/modules/fglrx/build_mod/firegl_public.c.orig       2016-06-19 18:04:29.731479926 +0200
2 +++ xorg-driver-video-fglrx-15.12/common/lib/modules/fglrx/build_mod/firegl_public.c    2016-06-19 18:11:14.236335016 +0200
3 @@ -3228,7 +3228,11 @@
4      int ret;
5  
6      down_read(&current->mm->mmap_sem);
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
8 +    ret = get_user_pages(vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
9 +#else
10      ret = get_user_pages(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
11 +#endif
12      up_read(&current->mm->mmap_sem);
13  
14      return ret;
15 @@ -3246,7 +3250,11 @@
16      int ret;
17  
18      down_read(&current->mm->mmap_sem);
19 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
20 +    ret = get_user_pages(vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
21 +#else
22      ret = get_user_pages(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
23 +#endif
24      up_read(&current->mm->mmap_sem);
25  
26      return ret;
27 @@ -3257,7 +3265,11 @@
28      unsigned int i;
29      for (i=0; i<page_cnt; i++)
30      {
31 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0))
32 +       put_page((struct page*)page_list[i]);
33 +#else
34          page_cache_release((struct page*)page_list[i]);
35 +#endif
36      }
37  }
38  
This page took 0.039237 seconds and 4 git commands to generate.