summaryrefslogtreecommitdiffstats
path: root/package/amd-catalyst/0001-Add-support-for-Linux-4.0.patch
blob: a0db9621a14bc1071c9cd0c824793d41388f0b60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From c35482bc0cc56b40263b74c3e58e42be867fd9f2 Mon Sep 17 00:00:00 2001
From: Alberto Milone <alberto.milone@canonical.com>
Date: Thu, 17 Sep 2015 15:41:46 +0200
Subject: [PATCH] Add support for Linux 4.0

Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
---
 common/lib/modules/fglrx/build_mod/firegl_public.c | 5 +++++
 common/lib/modules/fglrx/build_mod/kcl_str.c       | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
index 677565d..6017e89 100755
--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
@@ -285,6 +285,11 @@ MODULE_DEVICE_TABLE(pci, fglrx_pci_table);
 
 MODULE_INFO(supported, "external");
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
+#define read_cr4()       __read_cr4()
+#define write_cr4(cr4)   __write_cr4(cr4)
+#endif
+
 /* globals constants */
 const char*         KCL_SYSINFO_OsVersionString = UTS_RELEASE;
 const unsigned int  KCL_SYSINFO_PageSize        = PAGE_SIZE;
diff --git a/common/lib/modules/fglrx/build_mod/kcl_str.c b/common/lib/modules/fglrx/build_mod/kcl_str.c
index 2d89eb0..bacdb69 100755
--- a/common/lib/modules/fglrx/build_mod/kcl_str.c
+++ b/common/lib/modules/fglrx/build_mod/kcl_str.c
@@ -42,6 +42,10 @@
 #include "kcl_type.h"
 #include "kcl_str.h"
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
+#define strnicmp strncasecmp
+#endif
+
 /** \brief Fill memory with a constant byte
  *  \param s Pointer to memory
  *  \param c Initializing value
-- 
2.8.1

OpenPOWER on IntegriCloud