+++ /dev/null
-From 617bdbec386a1237e2a148989318cc4a1360788a Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Tue, 18 Aug 2015 23:08:48 +0000
-Subject: [PATCH] platform: Fix kernel version check for 3.14-based kernels
-Organization: O.S. Systems Software LTDA.
-
-The build fail about the bus frequency header (linux/busfreq-imx6.h)
-not being found is caused by the mistaken check for the wrong kernel
-version.
-
-This patch fixes it by adding the right kernel version to be checked.
-
-Upstream-Status: Pending
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----
- .../os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
-index a2e72ff..241614a 100644
---- a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
-+++ b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
-@@ -40,7 +40,7 @@
- #include <linux/pm_runtime.h>
- #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
- #include <mach/busfreq.h>
--#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
-+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
- #include <linux/busfreq-imx6.h>
- #include <linux/reset.h>
- #else
---
-2.1.4
-
--- /dev/null
+From 3ec514cf260b82f4701b6fed521ce470d9faf8c9 Mon Sep 17 00:00:00 2001
+From: Gary Thomas <gary@mlbassoc.com>
+Date: Tue, 6 Oct 2015 09:32:22 -0600
+Subject: [PATCH] kernel-module-imx-gpu-viv: Better work-around for change in name of busfreq-imx.h
+
+The renaming of include/linux/busfreq-imx6.h to include/linux/busfreq-imx.h
+is not consistent over the many kernel versions currently being built. This
+changeset works around this inconsistency by creating a local symbolic link
+to whatever file is actually present in the kernel sources.
+
+Signed-off-by: Gary Thomas <gary@mlbassoc.com>
+Upstream-status: Innapropriate [requires OE recipe support]
+----
+Index: kernel-module-imx-gpu-viv-5.0.11.p7.1/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
+===================================================================
+--- kernel-module-imx-gpu-viv-5.0.11.p7.1.orig/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
++++ kernel-module-imx-gpu-viv-5.0.11.p7.1/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
+@@ -74,11 +74,8 @@
+ #include <linux/pm_runtime.h>
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ #include <mach/busfreq.h>
+-#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
+-#include <linux/busfreq-imx6.h>
+-#include <linux/reset.h>
+ #else
+-#include <linux/busfreq-imx.h>
++#include "busfreq-imx.h"
+ #include <linux/reset.h>
+ #endif
+ #endif
SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.tar.gz \
file://updatemakefile.patch \
- file://platform-Fix-kernel-version-check-for-3.14-based-ker.patch"
+ file://work-around-include-file-rename.patch \
+"
SRC_URI[md5sum] = "a251a94390986371f75b338ad938e46f"
SRC_URI[sha256sum] = "9aaef0a62bc2be69dc568228192b060c54970b5c700fee602d83a4d13e04a9b3"
+
+# Work around inconsistent naming of <linux/busfreq-imx.h>
+do_compile_prepend () {
+ ln -sf ${STAGING_KERNEL_DIR}/include/linux/busfreq-imx*.h kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/busfreq-imx.h
+}
+