Sophie

Sophie

distrib > Mageia > 8 > armv7hl > media > core-backports-src > by-pkgid > c305df5fdfe86b6024a6af88ff300104 > files > 10

kernel-5.17.4-2.mga8.src.rpm


Adjust for 5.17

Signed-off-by: Thomas Backlund <tmb@mageia.org>

---
 3rdparty/ndiswrapper/ntoskernel.c |    2 +-
 3rdparty/ndiswrapper/proc.c       |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)


diff -urp linux-5.17/3rdparty/ndiswrapper.orig/ntoskernel.c linux-5.17/3rdparty/ndiswrapper/ntoskernel.c
--- linux-5.17/3rdparty/ndiswrapper.orig/ntoskernel.c	2022-04-08 21:10:39.993001112 +0300
+++ linux-5.17/3rdparty/ndiswrapper/ntoskernel.c	2022-04-08 21:46:06.032578773 +0300
@@ -1643,7 +1643,7 @@ wstdcall NTSTATUS WIN_FUNC(PsTerminateSy
 	} else
 		ERROR("couldn't find thread for task: %p", current);
 
-	complete_and_exit(NULL, status);
+	kthread_complete_and_exit(NULL, status);
 	ERROR("oops: %p, %d", thread->task, thread->pid);
 	return STATUS_FAILURE;
 }
diff -urp linux-5.17/3rdparty/ndiswrapper.orig/proc.c linux-5.17/3rdparty/ndiswrapper/proc.c
--- linux-5.17/3rdparty/ndiswrapper.orig/proc.c	2022-04-08 21:10:39.994001161 +0300
+++ linux-5.17/3rdparty/ndiswrapper/proc.c	2022-04-08 21:52:45.601231941 +0300
@@ -61,7 +61,7 @@ static inline void proc_remove(struct pr
 		remove_proc_entry(de->name, de->parent);
 }
 
-static inline void *PDE_DATA(const struct inode *inode)
+static inline void *pde_data(const struct inode *inode)
 {
 	return PDE(inode)->data;
 }
@@ -108,7 +108,7 @@ static int do_proc_make_entry(const char
 #define PROC_DECLARE_RO(name) \
 	static int proc_##name##_open(struct inode *inode, struct file *file) \
 	{ \
-		return single_open(file, proc_##name##_read, PDE_DATA(inode)); \
+		return single_open(file, proc_##name##_read, pde_data(inode)); \
 	} \
 	static const struct proc_ops name##_fops = { \
 		.proc_open = proc_##name##_open, \
@@ -120,7 +120,7 @@ static int do_proc_make_entry(const char
 #define PROC_DECLARE_RW(name) \
 	static int proc_##name##_open(struct inode *inode, struct file *file) \
 	{ \
-		return single_open(file, proc_##name##_read, PDE_DATA(inode)); \
+		return single_open(file, proc_##name##_read, pde_data(inode)); \
 	} \
 	static const struct proc_ops name##_fops = { \
 		.proc_open = proc_##name##_open, \
@@ -133,7 +133,7 @@ static int do_proc_make_entry(const char
 #define PROC_DECLARE_RO(name) \
 	static int proc_##name##_open(struct inode *inode, struct file *file) \
 	{ \
-		return single_open(file, proc_##name##_read, PDE_DATA(inode)); \
+		return single_open(file, proc_##name##_read, pde_data(inode)); \
 	} \
 	static struct file_operations name##_fops = { \
 		.owner = THIS_MODULE, \
@@ -146,7 +146,7 @@ static int do_proc_make_entry(const char
 #define PROC_DECLARE_RW(name) \
 	static int proc_##name##_open(struct inode *inode, struct file *file) \
 	{ \
-		return single_open(file, proc_##name##_read, PDE_DATA(inode)); \
+		return single_open(file, proc_##name##_read, pde_data(inode)); \
 	} \
 	static struct file_operations name##_fops = { \
 		.owner = THIS_MODULE, \
@@ -372,7 +372,7 @@ static int proc_settings_read(struct seq
 static ssize_t proc_settings_write(struct file *file, const char __user *buf,
 				   size_t count, loff_t *ppos)
 {
-	struct ndis_device *wnd = PDE_DATA(file_inode(file));
+	struct ndis_device *wnd = pde_data(file_inode(file));
 	char setting[MAX_PROC_STR_LEN], *p;
 	unsigned int i;
 	NDIS_STATUS res;