diff mbox series

[meta-ti,master/scarthgap] debugss-module-drv: Fix compile failure under kernel v6.10

Message ID 20240804164926.15650-1-reatmon@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [meta-ti,master/scarthgap] debugss-module-drv: Fix compile failure under kernel v6.10 | expand

Commit Message

Ryan Eatmon Aug. 4, 2024, 4:49 p.m. UTC
A compile error has apperaed when building againt the v6.10 kernel.

git/debugss_module/debugss-mod/debugss_kmodule.c:1149:34: error: array type has incomplete element type 'struct of_device_id'
 1149 | static const struct of_device_id dra7xx_debugss_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~

The easy fix is just to add an include for the header that defines the
missing struct.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 .../dsptop/debugss-module-drv_git.bb          |  2 ++
 ...le-Add-include-for-mod_devicetable.h.patch | 33 +++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 meta-ti-extras/recipes-bsp/dsptop/files/0001-debugss_kmodule-Add-include-for-mod_devicetable.h.patch
diff mbox series

Patch

diff --git a/meta-ti-extras/recipes-bsp/dsptop/debugss-module-drv_git.bb b/meta-ti-extras/recipes-bsp/dsptop/debugss-module-drv_git.bb
index 62b4645c..81e544f7 100644
--- a/meta-ti-extras/recipes-bsp/dsptop/debugss-module-drv_git.bb
+++ b/meta-ti-extras/recipes-bsp/dsptop/debugss-module-drv_git.bb
@@ -17,3 +17,5 @@  COMPATIBLE_MACHINE = "dra7xx"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 include dsptop.inc
+
+SRC_URI += "file://0001-debugss_kmodule-Add-include-for-mod_devicetable.h.patch"
diff --git a/meta-ti-extras/recipes-bsp/dsptop/files/0001-debugss_kmodule-Add-include-for-mod_devicetable.h.patch b/meta-ti-extras/recipes-bsp/dsptop/files/0001-debugss_kmodule-Add-include-for-mod_devicetable.h.patch
new file mode 100644
index 00000000..89cfe1cd
--- /dev/null
+++ b/meta-ti-extras/recipes-bsp/dsptop/files/0001-debugss_kmodule-Add-include-for-mod_devicetable.h.patch
@@ -0,0 +1,33 @@ 
+From 5a514f6a6bb1c49bdbaf8eabc1776f54851227af Mon Sep 17 00:00:00 2001
+From: Ryan Eatmon <reatmon@ti.com>
+Date: Sun, 4 Aug 2024 11:17:28 -0500
+Subject: [PATCH] debugss_kmodule: Add include for mod_devicetable.h
+
+Add include for <linux/mod_devicetable.h> to fix compile error:
+
+git/debugss_module/debugss-mod/debugss_kmodule.c:1149:34: error:
+array type has incomplete element type 'struct of_device_id'
+
+Upstream-Status: Inactive-Upstream
+
+Signed-off-by: Ryan Eatmon <reatmon@ti.com>
+---
+ debugss_kmodule.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/debugss_kmodule.c b/debugss_kmodule.c
+index 6fac61d..9e084eb 100644
+--- a/debugss_kmodule.c
++++ b/debugss_kmodule.c
+@@ -26,6 +26,8 @@
+ #include <linux/of_device.h>
+ #include "debugss_kmodule.h"
+ 
++#include <linux/mod_devicetable.h>
++
+ /* un-comment the line below to enable printing for kernel debug messages */
+ //#define DEBUGSS_DRV_DEBUG
+ 
+-- 
+2.17.1
+