Commit 6e79b600d44b4704a437686eed74c3759c71a36e

Authored by Geert Stappers
Committed by GitHub
2 parents 8f5842c1 e6a9db6b

Merge pull request #40 from navidsav/kernel_version

Bug fix for some kernel version for function: tty0tty_write_room
Showing 1 changed file with 4 additions and 0 deletions
module/tty0tty.c
@@ -258,7 +258,11 @@ exit: @@ -258,7 +258,11 @@ exit:
258 return retval; 258 return retval;
259 } 259 }
260 260
  261 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)
261 static unsigned int tty0tty_write_room(struct tty_struct *tty) 262 static unsigned int tty0tty_write_room(struct tty_struct *tty)
  263 +#else
  264 +static int tty0tty_write_room(struct tty_struct *tty)
  265 +#endif
262 { 266 {
263 struct tty0tty_serial *tty0tty = tty->driver_data; 267 struct tty0tty_serial *tty0tty = tty->driver_data;
264 int room = -ENOBUFS; 268 int room = -ENOBUFS;