about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ch9344/fix-incompatible-pointer-types.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/ch9344/fix-incompatible-pointer-types.patch')
-rw-r--r--pkgs/os-specific/linux/ch9344/fix-incompatible-pointer-types.patch26
1 files changed, 10 insertions, 16 deletions
diff --git a/pkgs/os-specific/linux/ch9344/fix-incompatible-pointer-types.patch b/pkgs/os-specific/linux/ch9344/fix-incompatible-pointer-types.patch
index 31088538733e..89c95347ed65 100644
--- a/pkgs/os-specific/linux/ch9344/fix-incompatible-pointer-types.patch
+++ b/pkgs/os-specific/linux/ch9344/fix-incompatible-pointer-types.patch
@@ -1,22 +1,16 @@
 diff --git a/ch9344.c b/ch9344.c
-index 1e37293..a16af82 100644
+index bfa10bb..76a94a7 100644
 --- a/ch9344.c
 +++ b/ch9344.c
-@@ -79,7 +79,7 @@ static DEFINE_IDR(ch9344_minors);
- static DEFINE_MUTEX(ch9344_minors_lock);
- 
- static void ch9344_tty_set_termios(struct tty_struct *tty,
--                                   struct ktermios *termios_old);
-+                                   const struct ktermios *termios_old);
- 
- static int ch9344_get_portnum(int index);
- 
-@@ -1597,7 +1597,7 @@ u8 cal_recv_tmt(__le32 bd)
+@@ -837,7 +837,11 @@ static void ch9344_tty_close(struct tty_struct *tty, struct file *filp)
+ 	}
  }
  
- static void ch9344_tty_set_termios(struct tty_struct *tty,
--                                   struct ktermios *termios_old)
-+                                   const struct ktermios *termios_old)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0))
++static ssize_t ch9344_tty_write(struct tty_struct *tty, const u8 *buf, size_t count)
++#else
+ static int ch9344_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
++#endif
  {
-     struct ch9344 *ch9344 = tty->driver_data;
-     struct ktermios *termios = &tty->termios;
+ 	struct ch9344 *ch9344 = tty->driver_data;
+ 	int stat;