diff options
author | Ryan Eatmon <reatmon@ti.com> | 2024-10-04 10:18:57 -0500 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2024-10-04 10:36:07 -0500 |
commit | fa3fe0413fb6910aa6b983a4ea86237f64010ae5 (patch) | |
tree | 3c82f0c04f785ec9a8d86c15eff493cb15e822f8 | |
parent | e6a4429404ac5f3495cc8efdf11f4f373db3b19b (diff) | |
download | meta-ti-fa3fe0413fb6910aa6b983a4ea86237f64010ae5.tar.gz |
debugss-module-drv: Add patch for kernel 6.11 change
There was a change to the return value for a function pointer in the
kernel v6.11. This patch adapts the module to the kernel change.
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
-rw-r--r-- | meta-ti-extras/recipes-bsp/dsptop/debugss-module-drv_git.bb | 5 | ||||
-rw-r--r-- | meta-ti-extras/recipes-bsp/dsptop/files/0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch | 57 |
2 files changed, 61 insertions, 1 deletions
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 81e544f7..74ceed9d 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 | |||
@@ -18,4 +18,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
18 | 18 | ||
19 | include dsptop.inc | 19 | include dsptop.inc |
20 | 20 | ||
21 | SRC_URI += "file://0001-debugss_kmodule-Add-include-for-mod_devicetable.h.patch" | 21 | SRC_URI += "\ |
22 | file://0001-debugss_kmodule-Add-include-for-mod_devicetable.h.patch \ | ||
23 | file://0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch \ | ||
24 | " | ||
diff --git a/meta-ti-extras/recipes-bsp/dsptop/files/0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch b/meta-ti-extras/recipes-bsp/dsptop/files/0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch new file mode 100644 index 00000000..0afe0264 --- /dev/null +++ b/meta-ti-extras/recipes-bsp/dsptop/files/0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From aaddf1fa8b92db23ae2ebc83826c2bb5f5c87c35 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ryan Eatmon <reatmon@ti.com> | ||
3 | Date: Thu, 3 Oct 2024 14:25:18 -0500 | ||
4 | Subject: [PATCH] debugss_kmodule: kernel 6.11 changed return value for remove | ||
5 | slot | ||
6 | |||
7 | In kernel version 6.11 the function footprint changed for the remove | ||
8 | slot to return a void instead of an int. [1] | ||
9 | |||
10 | Add ifdef checking code to look for kernel version and pick the correct | ||
11 | return code. | ||
12 | |||
13 | [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/platform_device.h?id=0edb555a65d1ef047a9805051c36922b52a38a9d | ||
14 | |||
15 | Upstream-Status: Inactive-Upstream [lastcommit: 2021-04-20] | ||
16 | |||
17 | Signed-off-by: Ryan Eatmon <reatmon@ti.com> | ||
18 | --- | ||
19 | debugss_kmodule.c | 4 ++++ | ||
20 | 1 file changed, 4 insertions(+) | ||
21 | |||
22 | diff --git a/debugss_kmodule.c b/debugss_kmodule.c | ||
23 | index 9e084eb..4191be8 100644 | ||
24 | --- a/debugss_kmodule.c | ||
25 | +++ b/debugss_kmodule.c | ||
26 | @@ -27,6 +27,7 @@ | ||
27 | #include "debugss_kmodule.h" | ||
28 | |||
29 | #include <linux/mod_devicetable.h> | ||
30 | +#include <linux/version.h> | ||
31 | |||
32 | /* un-comment the line below to enable printing for kernel debug messages */ | ||
33 | //#define DEBUGSS_DRV_DEBUG | ||
34 | @@ -1132,7 +1133,11 @@ static int dra7xx_debugss_probe(struct platform_device *pdev) | ||
35 | return retval; | ||
36 | } | ||
37 | |||
38 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)) | ||
39 | static int dra7xx_debugss_remove(struct platform_device *pdev) | ||
40 | +#else | ||
41 | +static void dra7xx_debugss_remove(struct platform_device *pdev) | ||
42 | +#endif | ||
43 | { | ||
44 | __D("%s:\n",__FUNCTION__); | ||
45 | |||
46 | @@ -1145,7 +1150,9 @@ static int dra7xx_debugss_remove(struct platform_device *pdev) | ||
47 | /* Un-prepare debugSS clock */ | ||
48 | clk_disable_unprepare(sys_clk_in1); | ||
49 | |||
50 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)) | ||
51 | return 0; | ||
52 | +#endif | ||
53 | } | ||
54 | |||
55 | static const struct of_device_id dra7xx_debugss_of_match[] = { | ||
56 | -- | ||
57 | 2.17.1 | ||