From e6a9db6b148e1bf642d88b9cc7e4c7edf5efdf5d Mon Sep 17 00:00:00 2001 From: navidsav Date: Wed, 6 Apr 2022 12:20:06 +0430 Subject: [PATCH] Bug fix for some kernel version for function: tty0tty_write_room --- module/tty0tty.c | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/module/tty0tty.c b/module/tty0tty.c index 2dfdb8b..e69f4ff 100644 --- a/module/tty0tty.c +++ b/module/tty0tty.c @@ -258,7 +258,11 @@ exit: return retval; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0) static unsigned int tty0tty_write_room(struct tty_struct *tty) +#else +static int tty0tty_write_room(struct tty_struct *tty) +#endif { struct tty0tty_serial *tty0tty = tty->driver_data; int room = -ENOBUFS; -- libgit2 0.21.4