| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Input device TTY line discipline |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 7 | 8 | * 'serial io port' abstraction that the input device drivers use. |
|---|
| 8 | 9 | */ |
|---|
| 9 | 10 | |
|---|
| 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 | | - */ |
|---|
| 15 | 11 | |
|---|
| 16 | 12 | #include <linux/uaccess.h> |
|---|
| 17 | 13 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 160 | 156 | * returning 0 characters. |
|---|
| 161 | 157 | */ |
|---|
| 162 | 158 | |
|---|
| 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) |
|---|
| 164 | 162 | { |
|---|
| 165 | 163 | struct serport *serport = (struct serport*) tty->disc_data; |
|---|
| 166 | 164 | struct serio *serio; |
|---|
| .. | .. |
|---|
| 226 | 224 | |
|---|
| 227 | 225 | #ifdef CONFIG_COMPAT |
|---|
| 228 | 226 | #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, |
|---|
| 230 | 228 | struct file *file, |
|---|
| 231 | 229 | unsigned int cmd, unsigned long arg) |
|---|
| 232 | 230 | { |
|---|