hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/input/serio/serport.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Input device TTY line discipline
34 *
....@@ -7,11 +8,6 @@
78 * 'serial io port' abstraction that the input device drivers use.
89 */
910
10
-/*
11
- * This program is free software; you can redistribute it and/or modify it
12
- * under the terms of the GNU General Public License version 2 as published by
13
- * the Free Software Foundation.
14
- */
1511
1612 #include <linux/uaccess.h>
1713 #include <linux/kernel.h>
....@@ -160,7 +156,9 @@
160156 * returning 0 characters.
161157 */
162158
163
-static ssize_t serport_ldisc_read(struct tty_struct * tty, struct file * file, unsigned char __user * buf, size_t nr)
159
+static ssize_t serport_ldisc_read(struct tty_struct * tty, struct file * file,
160
+ unsigned char *kbuf, size_t nr,
161
+ void **cookie, unsigned long offset)
164162 {
165163 struct serport *serport = (struct serport*) tty->disc_data;
166164 struct serio *serio;
....@@ -226,7 +224,7 @@
226224
227225 #ifdef CONFIG_COMPAT
228226 #define COMPAT_SPIOCSTYPE _IOW('q', 0x01, compat_ulong_t)
229
-static long serport_ldisc_compat_ioctl(struct tty_struct *tty,
227
+static int serport_ldisc_compat_ioctl(struct tty_struct *tty,
230228 struct file *file,
231229 unsigned int cmd, unsigned long arg)
232230 {