1diff -Nru 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c
2--- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-07-04 10:31:23.000000000 -0400
3+++ 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-08-03 21:21:13.893211082 -0400
4@@ -242,6 +242,14 @@
5 #endif
6
7 // ============================================================
8+
9+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
10+#define __read_cr4 read_cr4
11+#define __write_cr4 write_cr4
12+#endif
13+
14+// ============================================================
15+
16 /* globals */
17
18 char* firegl = NULL;
19@@ -3495,10 +3503,12 @@
20 KCL_PUB_InterruptHandlerWrap,
21 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
22 ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)),
23-#else
24+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
25 //when MSI enabled. keep irq disabled when calling the action handler,
26 //exclude this IRQ from irq balancing (only on one CPU)
27 ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),
28+#else
29+ ((useMSI) ? 0 : IRQF_SHARED),
30 #endif
31 dev_name,
32 context);
33@@ -4498,8 +4508,8 @@
34
35 if (cpu_has_pge)
36 {
37- cr4 = read_cr4();
38- write_cr4(cr4 & ~X86_CR4_PGE);
39+ cr4 = __read_cr4();
40+ __write_cr4(cr4 & ~X86_CR4_PGE);
41 }
42 __flush_tlb();
43
44@@ -4512,7 +4522,7 @@
45 write_cr0(cr0 & 0xbfffffff);
46 if (cpu_has_pge)
47 {
48- write_cr4(cr4);
49+ __write_cr4(cr4);
50 }
51 local_irq_restore(flags);
52
53@@ -4539,8 +4549,8 @@
54
55 if (cpu_has_pge)
56 {
57- cr4 = read_cr4();
58- write_cr4(cr4 & ~X86_CR4_PGE);
59+ cr4 = __read_cr4();
60+ __write_cr4(cr4 & ~X86_CR4_PGE);
61 }
62 __flush_tlb();
63
64@@ -4552,7 +4562,7 @@
65 write_cr0(cr0 & 0xbfffffff);
66 if (cpu_has_pge)
67 {
68- write_cr4(cr4);
69+ __write_cr4(cr4);
70 }
71 local_irq_restore(flags);
72
73diff -Nru 15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c 15.7.new/common/lib/modules/fglrx/build_mod/kcl_acpi.c
74--- 15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2015-07-04 10:31:23.000000000 -0400
75+++ 15.7.new/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2015-08-02 19:59:54.797911610 -0400
76@@ -861,7 +861,10 @@
77 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
78 if(pdev)
79 {
80- pci_ignore_hotplug(pdev);
81+ struct pci_dev *bridge = pdev->bus->self;
82+
83+ pdev->ignore_hotplug = 1;
84+ if(bridge) bridge->ignore_hotplug = 1;
85 }
86 #endif
87 }
88diff -Nru 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c 15.7.new/common/lib/modules/fglrx/build_mod/kcl_str.c
89--- 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-07-04 10:31:23.000000000 -0400
90+++ 15.7.new/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-08-03 00:35:25.938410435 -0400
91@@ -169,7 +169,7 @@
92 const char* s2,
93 KCL_TYPE_SizeSigned count)
94 {
95- return strnicmp(s1, s2, count);
96+ return strncasecmp(s1, s2, count);
97 }
98
99 /** \brief Locate character in string