Update github.com git:// SRC_URIs
[AGL/meta-agl-demo.git] / recipes-kernel / most / files / 0014-Fix-build-with-5.9-kernel.patch
1 Fix building against 5.9 or newer kernels
2
3 DECLARE_TASKLET was replaced with DECLARE_TASKLET_OLD in 5.9.
4 Marking as inappropriate for upstream for now, as it seems the
5 standalone version of the driver has been superceded by the version
6 in the staging tree in the mainline kernel, and there are no obvious
7 signs of maintenance.
8
9 Upstream-Status: Inappropriate [no upstream]
10 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
11
12 ---
13  driver/hdm-dim2/dim2_hdm.c | 5 +++++
14  1 file changed, 5 insertions(+)
15
16 diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c
17 index 1847091..fc02c6b 100644
18 --- a/hdm-dim2/dim2_hdm.c
19 +++ b/hdm-dim2/dim2_hdm.c
20 @@ -14,6 +14,7 @@
21  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
22  
23  #include <linux/module.h>
24 +#include <linux/version.h>
25  #include <linux/of_platform.h>
26  #include <linux/printk.h>
27  #include <linux/kernel.h>
28 @@ -53,7 +54,11 @@ MODULE_PARM_DESC(fcnt, "Num of frames per sub-buffer for sync channels as a powe
29  static DEFINE_SPINLOCK(dim_lock);
30  
31  static void dim2_tasklet_fn(unsigned long data);
32 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
33  static DECLARE_TASKLET(dim2_tasklet, dim2_tasklet_fn, 0);
34 +#else
35 +static DECLARE_TASKLET_OLD(dim2_tasklet, dim2_tasklet_fn);
36 +#endif
37  
38  /**
39   * struct hdm_channel - private structure to keep channel specific data