rtl8812au-ct: fix even more compilation error with kernel 6.1
[openwrt/openwrt.git] / package / kernel / rtl8812au-ct / patches / 010-os_dep-linux-proc-move-to-pde_data-function.patch
1 From f455198acaa71c2963746a6b17c878c7d1d0e331 Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Sun, 30 Jul 2023 11:22:58 +0200
4 Subject: [PATCH 5/5] os_dep/linux/proc: move to pde_data function
5
6 PDE_DATA macro was dropped in 5.17 with the new pde_data that does the
7 exact thing. Fix compilation error and use new function.
8
9 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 ---
11 os_dep/linux/rtw_proc.c | 4 ++++
12 1 file changed, 4 insertions(+)
13
14 --- a/os_dep/linux/rtw_proc.c
15 +++ b/os_dep/linux/rtw_proc.c
16 @@ -37,6 +37,10 @@ inline struct proc_dir_entry *get_rtw_dr
17 #define file_inode(file) ((file)->f_dentry->d_inode)
18 #endif
19
20 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
21 +#define PDE_DATA(inode) pde_data(inode)
22 +#endif
23 +
24 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
25 #define PDE_DATA(inode) PDE((inode))->data
26 #define proc_get_parent_data(inode) PDE((inode))->parent->data