openwrt/package/kernel/rtl8812au-ct/patches/010-os_dep-linux-proc-move-to-pde_data-function.patch

27 lines
926 B
Diff
Raw Normal View History

From f455198acaa71c2963746a6b17c878c7d1d0e331 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Sun, 30 Jul 2023 11:22:58 +0200
Subject: [PATCH 5/5] os_dep/linux/proc: move to pde_data function
PDE_DATA macro was dropped in 5.17 with the new pde_data that does the
exact thing. Fix compilation error and use new function.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
os_dep/linux/rtw_proc.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/os_dep/linux/rtw_proc.c
+++ b/os_dep/linux/rtw_proc.c
@@ -37,6 +37,10 @@ inline struct proc_dir_entry *get_rtw_dr
#define file_inode(file) ((file)->f_dentry->d_inode)
#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
+#define PDE_DATA(inode) pde_data(inode)
+#endif
+
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
#define PDE_DATA(inode) PDE((inode))->data
#define proc_get_parent_data(inode) PDE((inode))->parent->data