git.graph-it.com
/
graphit
/
unipi-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b751c3b
)
Fix ioctl 0x5480 for Linux>5.0 (set uart timeout)
author
Miroslav Ondra
<ondra@faster.cz>
Wed, 24 Mar 2021 12:09:34 +0000
(13:09 +0100)
committer
Miroslav Ondra
<ondra@faster.cz>
Wed, 24 Mar 2021 12:09:34 +0000
(13:09 +0100)
modules/unipi/src/unipi_tty.c
patch
|
blob
|
history
diff --git
a/modules/unipi/src/unipi_tty.c
b/modules/unipi/src/unipi_tty.c
index 557197084c3d733f5f8fd124005939c21a378e2f..b59f664bc5b395eae057de388409ff779fb5c425 100644
(file)
--- a/
modules/unipi/src/unipi_tty.c
+++ b/
modules/unipi/src/unipi_tty.c
@@
-940,6
+940,16
@@
static int unipi_tty_ioctl(struct tty_struct *tty, struct file *file,
retval = read_cnt(ldata);
up_write(&tty->termios_rwsem);
return put_user(retval, (unsigned int __user *) arg);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
+ case 0x5481:
+ case 0x5480:
+ if (tty->ops->ioctl != NULL) {
+ retval = tty->ops->ioctl(tty, cmd, arg);
+ if (retval != -ENOIOCTLCMD)
+ return retval;
+ }
+ // fall through
+#endif
default:
return n_tty_ioctl_helper(tty, file, cmd, arg);
}