Skip to content

Commit

Permalink
Add patch descriptions, kernel ver conditionals
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Venenga <[email protected]>
  • Loading branch information
nijave committed Dec 30, 2024
1 parent 3c85825 commit 9fcb007
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
diff --git a/KernelDrivers/eq3_char_loop.c b/KernelDrivers/eq3_char_loop.c
index de2d637d..782958d1 100644
--- a/KernelDrivers/eq3_char_loop.c
+++ b/KernelDrivers/eq3_char_loop.c
@@ -898,7 +898,6 @@ static int eq3loop_open(struct inode *inode, struct file *filp)
Remove llseek NULL'd in 6.0 (868941b) removed in 6.12 (cb787f4)

Signed-off-by: Nick Venenga <[email protected]>

--- a/KernelDrivers/eq3_char_loop.c
+++ b/KernelDrivers/eq3_char_loop.c
@@ -898,7 +898,6 @@ static int eq3loop_open(struct inode *inode, struct file *filp)

static struct file_operations eq3loop_fops = {
.owner = THIS_MODULE,
- .llseek = no_llseek,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
.llseek = no_llseek,
+#endif
.read = eq3loop_read,
.write = eq3loop_write,
.open = eq3loop_open,
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
diff --git a/kernel/generic_raw_uart.c
index e227333e0..99946a3ad 100644
Remove llseek NULL'd in 6.0 (868941b) removed in 6.12 (cb787f4)

Signed-off-by: Nick Venenga <[email protected]>

--- a/kernel/generic_raw_uart.c
+++ b/kernel/generic_raw_uart.c
@@ -147,7 +147,6 @@ static int generic_raw_uart_get_device_type(struct generic_raw_uart_instance *in
@@ -147,7 +147,9 @@ static int generic_raw_uart_get_device_type(struct generic_raw_uart_instance *in
static struct file_operations generic_raw_uart_fops =
{
.owner = THIS_MODULE,
- .llseek = no_llseek,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
.llseek = no_llseek,
+#endif
.read = generic_raw_uart_read,
.write = generic_raw_uart_write,
.open = generic_raw_uart_open,
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Replace `gpiochip_add` removed in 6.11 (3ff1180) with `gpiochip_add_data` added in 4.5 (b08ea35)

Signed-off-by: Nick Venenga <[email protected]>

--- a/kernel/hb_rf_eth.c
+++ b/kernel/hb_rf_eth.c
@@ -715,7 +715,11 @@ static int __init hb_rf_eth_init(void)
gc.base = -1;
gc.can_sleep = false;

+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
err = gpiochip_add(&gc);
+#else
+ err = gpiochip_add_data(&gc, NULL);
+#endif
if (err)
goto failed_gc_create;

This file was deleted.

0 comments on commit 9fcb007

Please sign in to comment.