From: Linus Torvalds Date: Tue, 14 Nov 2017 05:05:31 +0000 (-0800) Subject: Merge tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty X-Git-Tag: v4.15-rc1~141 X-Git-Url: https://repo.jachan.dev/linux.git/commitdiff_plain/fb0255fb2941ef6f21742b2bc146d6b9aef4fedc?hp=-c Merge tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the big tty/serial driver pull request for 4.15-rc1. Lots of serial driver updates in here, some small vt cleanups, and a raft of SPDX and license boilerplate cleanups, messing up the diffstat a bit. Nothing major, with no realy functional changes except better hardware support for some platforms. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (110 commits) tty: ehv_bytechan: fix spelling mistake tty: serial: meson: allow baud-rates lower than 9600 serial: 8250_fintek: Fix crash with baud rate B0 serial: 8250_fintek: Disable delays for ports != 0 serial: 8250_fintek: Return -EINVAL on invalid configuration tty: Remove redundant license text tty: serdev: Remove redundant license text tty: hvc: Remove redundant license text tty: serial: Remove redundant license text tty: add SPDX identifiers to all remaining files in drivers/tty/ tty: serial: jsm: remove redundant pointer ts tty: serial: jsm: add space before the open parenthesis '(' tty: serial: jsm: fix coding style tty: serial: jsm: delete space between function name and '(' tty: serial: jsm: add blank line after declarations tty: serial: jsm: change the type of local variable tty: serial: imx: remove dead code imx_dma_rxint tty: serial: imx: disable ageing timer interrupt if dma in use serial: 8250: fix potential deadlock in rs485-mode serial: m32r_sio: Drop redundant .data assignment ... --- fb0255fb2941ef6f21742b2bc146d6b9aef4fedc diff --combined drivers/acpi/scan.c index 81367edc8a10,860b6987c2d1..e14e964bfe6d --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@@ -1505,41 -1505,38 +1505,38 @@@ static void acpi_init_coherency(struct adev->flags.coherent_dma = cca; } - static int acpi_check_spi_i2c_slave(struct acpi_resource *ares, void *data) + static int acpi_check_serial_bus_slave(struct acpi_resource *ares, void *data) { - bool *is_spi_i2c_slave_p = data; + bool *is_serial_bus_slave_p = data; if (ares->type != ACPI_RESOURCE_TYPE_SERIAL_BUS) return 1; - /* - * devices that are connected to UART still need to be enumerated to - * platform bus - */ - if (ares->data.common_serial_bus.type != ACPI_RESOURCE_SERIAL_TYPE_UART) - *is_spi_i2c_slave_p = true; + *is_serial_bus_slave_p = true; /* no need to do more checking */ return -1; } - static bool acpi_is_spi_i2c_slave(struct acpi_device *device) + static bool acpi_is_serial_bus_slave(struct acpi_device *device) { struct list_head resource_list; - bool is_spi_i2c_slave = false; + bool is_serial_bus_slave = false; /* Macs use device properties in lieu of _CRS resources */ if (x86_apple_machine && (fwnode_property_present(&device->fwnode, "spiSclkPeriod") || - fwnode_property_present(&device->fwnode, "i2cAddress"))) + fwnode_property_present(&device->fwnode, "i2cAddress") || + fwnode_property_present(&device->fwnode, "baud"))) return true; INIT_LIST_HEAD(&resource_list); - acpi_dev_get_resources(device, &resource_list, acpi_check_spi_i2c_slave, - &is_spi_i2c_slave); + acpi_dev_get_resources(device, &resource_list, + acpi_check_serial_bus_slave, + &is_serial_bus_slave); acpi_dev_free_resource_list(&resource_list); - return is_spi_i2c_slave; + return is_serial_bus_slave; } void acpi_init_device_object(struct acpi_device *device, acpi_handle handle, @@@ -1557,7 -1554,7 +1554,7 @@@ acpi_bus_get_flags(device); device->flags.match_driver = false; device->flags.initialized = true; - device->flags.spi_i2c_slave = acpi_is_spi_i2c_slave(device); + device->flags.serial_bus_slave = acpi_is_serial_bus_slave(device); acpi_device_clear_enumerated(device); device_initialize(&device->dev); dev_set_uevent_suppress(&device->dev, true); @@@ -1841,10 -1838,10 +1838,10 @@@ static acpi_status acpi_bus_check_add(a static void acpi_default_enumeration(struct acpi_device *device) { /* - * Do not enumerate SPI/I2C slaves as they will be enumerated by their - * respective parents. + * Do not enumerate SPI/I2C/UART slaves as they will be enumerated by + * their respective parents. */ - if (!device->flags.spi_i2c_slave) { + if (!device->flags.serial_bus_slave) { acpi_create_platform_device(device, NULL); acpi_device_set_enumerated(device); } else { @@@ -1941,7 -1938,7 +1938,7 @@@ static void acpi_bus_attach(struct acpi return; device->flags.match_driver = true; - if (ret > 0 && !device->flags.spi_i2c_slave) { + if (ret > 0 && !device->flags.serial_bus_slave) { acpi_device_set_enumerated(device); goto ok; } @@@ -1950,7 -1947,7 +1947,7 @@@ if (ret < 0) return; - if (!device->pnp.type.platform_id && !device->flags.spi_i2c_slave) + if (!device->pnp.type.platform_id && !device->flags.serial_bus_slave) acpi_device_set_enumerated(device); else acpi_default_enumeration(device); @@@ -2122,7 -2119,6 +2119,7 @@@ int __init acpi_scan_init(void acpi_int340x_thermal_init(); acpi_amba_init(); acpi_watchdog_init(); + acpi_init_lpit(); acpi_scan_add_handler(&generic_device_handler); diff --combined drivers/tty/cyclades.c index dac8a1a8e4ac,4f69f1043e26..5d442469c95e --- a/drivers/tty/cyclades.c +++ b/drivers/tty/cyclades.c @@@ -1,3 -1,4 +1,4 @@@ + // SPDX-License-Identifier: GPL-2.0 #undef BLOCKMOVE #define Z_WAKE #undef Z_EXT_CHARS_IN_BUFFER @@@ -283,11 -284,10 +284,10 @@@ static void cyz_poll(unsigned long) /* The Cyclades-Z polling cycle is defined by this variable */ static long cyz_polling_cycle = CZ_DEF_POLL; -static DEFINE_TIMER(cyz_timerlist, cyz_poll, 0, 0); +static DEFINE_TIMER(cyz_timerlist, cyz_poll); #else /* CONFIG_CYZ_INTR */ - static void cyz_rx_restart(unsigned long); - static struct timer_list cyz_rx_full_timer[NR_PORTS]; + static void cyz_rx_restart(struct timer_list *); #endif /* CONFIG_CYZ_INTR */ static void cyy_writeb(struct cyclades_port *port, u32 reg, u8 val) @@@ -992,10 -992,8 +992,8 @@@ static void cyz_handle_rx(struct cyclad else char_count = rx_put - rx_get + rx_bufsize; if (char_count >= readl(&buf_ctrl->rx_threshold) && - !timer_pending(&cyz_rx_full_timer[ - info->line])) - mod_timer(&cyz_rx_full_timer[info->line], - jiffies + 1); + !timer_pending(&info->rx_full_timer)) + mod_timer(&info->rx_full_timer, jiffies + 1); #endif info->idle_stats.recv_idle = jiffies; tty_schedule_flip(&info->port); @@@ -1197,9 -1195,9 +1195,9 @@@ static irqreturn_t cyz_interrupt(int ir return IRQ_HANDLED; } /* cyz_interrupt */ - static void cyz_rx_restart(unsigned long arg) + static void cyz_rx_restart(struct timer_list *t) { - struct cyclades_port *info = (struct cyclades_port *)arg; + struct cyclades_port *info = from_timer(info, t, rx_full_timer); struct cyclades_card *card = info->card; int retval; __u32 channel = info->line - card->first_line; @@@ -3097,8 -3095,7 +3095,7 @@@ static int cy_init_card(struct cyclades else info->xmit_fifo_size = 4 * CYZ_FIFO_SIZE; #ifdef CONFIG_CYZ_INTR - setup_timer(&cyz_rx_full_timer[port], - cyz_rx_restart, (unsigned long)info); + timer_setup(&info->rx_full_timer, cyz_rx_restart, 0); #endif } else { unsigned short chip_number; diff --combined drivers/tty/isicom.c index 40af32108ff5,d666fb1e80f6..ee7958ab269f --- a/drivers/tty/isicom.c +++ b/drivers/tty/isicom.c @@@ -1,9 -1,5 +1,5 @@@ + // SPDX-License-Identifier: GPL-2.0+ /* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * * Original driver code supplied by Multi-Tech * * Changes @@@ -177,7 -173,7 +173,7 @@@ static struct tty_driver *isicom_normal static void isicom_tx(unsigned long _data); static void isicom_start(struct tty_struct *tty); -static DEFINE_TIMER(tx, isicom_tx, 0, 0); +static DEFINE_TIMER(tx, isicom_tx); /* baud index mappings from linux defns to isi */ diff --combined drivers/tty/moxa.c index 93d37655d928,687c091bd066..65a70f3c7cde --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c @@@ -1,3 -1,4 +1,4 @@@ + // SPDX-License-Identifier: GPL-2.0+ /*****************************************************************************/ /* * moxa.c -- MOXA Intellio family multiport serial driver. @@@ -7,11 -8,6 +8,6 @@@ * * This code is loosely based on the Linux serial driver, written by * Linus Torvalds, Theodore T'so and others. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ /* @@@ -428,7 -424,7 +424,7 @@@ static const struct tty_port_operation }; static struct tty_driver *moxaDriver; -static DEFINE_TIMER(moxaTimer, moxa_poll, 0, 0); +static DEFINE_TIMER(moxaTimer, moxa_poll); /* * HW init diff --combined drivers/tty/rocket.c index aa695fda1084,375afc3e6850..f7dc9b1ea806 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c @@@ -1,23 -1,10 +1,10 @@@ + // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) /* * RocketPort device driver for Linux * * Written by Theodore Ts'o, 1995, 1996, 1997, 1998, 1999, 2000. * * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003 by Comtrol, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* @@@ -111,7 -98,7 +98,7 @@@ static struct r_port *rp_table[MAX_RP_P static unsigned int xmit_flags[NUM_BOARDS]; /* Bit significant, indicates port had data to transmit. */ /* eg. Bit 0 indicates port 0 has xmit data, ... */ static atomic_t rp_num_ports_open; /* Number of serial ports open */ -static DEFINE_TIMER(rocket_timer, rp_do_poll, 0, 0); +static DEFINE_TIMER(rocket_timer, rp_do_poll); static unsigned long board1; /* ISA addresses, retrieved from rocketport.conf */ static unsigned long board2; diff --combined drivers/tty/serial/sh-sci.h index 938e23a2d166,2b708cc0e66c..a5f792fd48d9 --- a/drivers/tty/serial/sh-sci.h +++ b/drivers/tty/serial/sh-sci.h @@@ -1,4 -1,3 +1,4 @@@ +/* SPDX-License-Identifier: GPL-2.0 */ #include #include #include @@@ -63,6 -62,9 +63,9 @@@ enum #define SCSCR_TDRQE BIT(15) /* Tx Data Transfer Request Enable */ #define SCSCR_RDRQE BIT(14) /* Rx Data Transfer Request Enable */ + /* Serial Control Register, HSCIF-only bits */ + #define HSSCR_TOT_SHIFT 14 + /* SCxSR (Serial Status Register) on SCI */ #define SCI_TDRE BIT(7) /* Transmit Data Register Empty */ #define SCI_RDRF BIT(6) /* Receive Data Register Full */ diff --combined drivers/tty/sysrq.c index d008f5a75197,ecee833df47e..b674793be478 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@@ -1,4 -1,3 +1,4 @@@ +// SPDX-License-Identifier: GPL-2.0 /* * Linux Magic System Request Key Hacks * @@@ -246,8 -245,10 +246,10 @@@ static void sysrq_handle_showallcpus(in * architecture has no support for it: */ if (!trigger_all_cpu_backtrace()) { - struct pt_regs *regs = get_irq_regs(); + struct pt_regs *regs = NULL; + if (in_irq()) + regs = get_irq_regs(); if (regs) { pr_info("CPU%d:\n", smp_processor_id()); show_regs(regs); @@@ -266,7 -267,10 +268,10 @@@ static struct sysrq_key_op sysrq_showal static void sysrq_handle_showregs(int key) { - struct pt_regs *regs = get_irq_regs(); + struct pt_regs *regs = NULL; + + if (in_irq()) + regs = get_irq_regs(); if (regs) show_regs(regs); perf_event_print_debug(); @@@ -649,9 -653,9 +654,9 @@@ static void sysrq_parse_reset_sequence( state->reset_seq_version = sysrq_reset_seq_version; } - static void sysrq_do_reset(unsigned long _state) + static void sysrq_do_reset(struct timer_list *t) { - struct sysrq_state *state = (struct sysrq_state *) _state; + struct sysrq_state *state = from_timer(state, t, keyreset_timer); state->reset_requested = true; @@@ -668,7 -672,7 +673,7 @@@ static void sysrq_handle_reset_request( mod_timer(&state->keyreset_timer, jiffies + msecs_to_jiffies(sysrq_reset_downtime_ms)); else - sysrq_do_reset((unsigned long)state); + sysrq_do_reset(&state->keyreset_timer); } static void sysrq_detect_reset_sequence(struct sysrq_state *state, @@@ -904,8 -908,7 +909,7 @@@ static int sysrq_connect(struct input_h sysrq->handle.handler = handler; sysrq->handle.name = "sysrq"; sysrq->handle.private = sysrq; - setup_timer(&sysrq->keyreset_timer, - sysrq_do_reset, (unsigned long)sysrq); + timer_setup(&sysrq->keyreset_timer, sysrq_do_reset, 0); error = input_register_handle(&sysrq->handle); if (error) { diff --combined drivers/tty/tty_ldisc.c index 84a8ac2a779f,73598f2a3ada..24ec5c7e6b20 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c @@@ -1,3 -1,4 +1,4 @@@ + // SPDX-License-Identifier: GPL-2.0 #include #include #include @@@ -694,8 -695,10 +695,8 @@@ int tty_ldisc_reinit(struct tty_struct tty_set_termios_ldisc(tty, disc); retval = tty_ldisc_open(tty, tty->ldisc); if (retval) { - if (!WARN_ON(disc == N_TTY)) { - tty_ldisc_put(tty->ldisc); - tty->ldisc = NULL; - } + tty_ldisc_put(tty->ldisc); + tty->ldisc = NULL; } return retval; } @@@ -750,9 -753,8 +751,9 @@@ void tty_ldisc_hangup(struct tty_struc if (tty->ldisc) { if (reinit) { - if (tty_ldisc_reinit(tty, tty->termios.c_line) < 0) - tty_ldisc_reinit(tty, N_TTY); + if (tty_ldisc_reinit(tty, tty->termios.c_line) < 0 && + tty_ldisc_reinit(tty, N_TTY) < 0) + WARN_ON(tty_ldisc_reinit(tty, N_NULL) < 0); } else tty_ldisc_kill(tty); } diff --combined drivers/tty/vt/keyboard.c index f974d6340d04,749e5a5521e6..c8d90d7e7e37 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@@ -1,3 -1,4 +1,4 @@@ + // SPDX-License-Identifier: GPL-2.0 /* * Written for linux by Johan Myreen as a translation from * the assembly version by Linus (with diacriticals added) @@@ -250,7 -251,7 +251,7 @@@ static void kd_nosound(unsigned long ig input_handler_for_each_handle(&kbd_handler, &zero, kd_sound_helper); } -static DEFINE_TIMER(kd_mksound_timer, kd_nosound, 0, 0); +static DEFINE_TIMER(kd_mksound_timer, kd_nosound); void kd_mksound(unsigned int hz, unsigned int ticks) { diff --combined drivers/tty/vt/vt.c index 602d71630952,60f509dc0be5..bce4c71cb338 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@@ -1,3 -1,4 +1,4 @@@ + // SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 1991, 1992 Linus Torvalds */ @@@ -102,6 -103,7 +103,7 @@@ #include #include #include + #include #define MAX_NR_CON_DRIVER 16 @@@ -228,7 -230,7 +230,7 @@@ static int scrollback_delta */ int (*console_blank_hook)(int); -static DEFINE_TIMER(console_timer, blank_screen_t, 0, 0); +static DEFINE_TIMER(console_timer, blank_screen_t); static int blank_state; static int blank_timer_expired; enum { @@@ -2142,22 -2144,15 +2144,15 @@@ struct interval uint32_t last; }; - static int bisearch(uint32_t ucs, const struct interval *table, int max) + static int ucs_cmp(const void *key, const void *elt) { - int min = 0; - int mid; + uint32_t ucs = *(uint32_t *)key; + struct interval e = *(struct interval *) elt; - if (ucs < table[0].first || ucs > table[max].last) - return 0; - while (max >= min) { - mid = (min + max) / 2; - if (ucs > table[mid].last) - min = mid + 1; - else if (ucs < table[mid].first) - max = mid - 1; - else - return 1; - } + if (ucs > e.last) + return 1; + else if (ucs < e.first) + return -1; return 0; } @@@ -2169,7 -2164,12 +2164,12 @@@ static int is_double_width(uint32_t ucs { 0xFE10, 0xFE19 }, { 0xFE30, 0xFE6F }, { 0xFF00, 0xFF60 }, { 0xFFE0, 0xFFE6 }, { 0x20000, 0x2FFFD }, { 0x30000, 0x3FFFD } }; - return bisearch(ucs, double_width, ARRAY_SIZE(double_width) - 1); + if (ucs < double_width[0].first || + ucs > double_width[ARRAY_SIZE(double_width) - 1].last) + return 0; + + return bsearch(&ucs, double_width, ARRAY_SIZE(double_width), + sizeof(struct interval), ucs_cmp) != NULL; } static void con_flush(struct vc_data *vc, unsigned long draw_from, @@@ -2205,7 -2205,7 +2205,7 @@@ static int do_con_write(struct tty_stru console_lock(); vc = tty->driver_data; if (vc == NULL) { - printk(KERN_ERR "vt: argh, driver_data is NULL !\n"); + pr_err("vt: argh, driver_data is NULL !\n"); console_unlock(); return 0; } @@@ -3190,20 -3190,21 +3190,21 @@@ static int do_bind_con_driver(const str pr_info("Console: switching "); if (!deflt) - printk(KERN_CONT "consoles %d-%d ", first+1, last+1); + pr_cont("consoles %d-%d ", first + 1, last + 1); if (j >= 0) { struct vc_data *vc = vc_cons[j].d; - printk(KERN_CONT "to %s %s %dx%d\n", - vc->vc_can_do_color ? "colour" : "mono", - desc, vc->vc_cols, vc->vc_rows); + pr_cont("to %s %s %dx%d\n", + vc->vc_can_do_color ? "colour" : "mono", + desc, vc->vc_cols, vc->vc_rows); if (k >= 0) { vc = vc_cons[k].d; update_screen(vc); } - } else - printk(KERN_CONT "to %s\n", desc); + } else { + pr_cont("to %s\n", desc); + } retval = 0; err: @@@ -3622,9 -3623,8 +3623,8 @@@ static int do_register_con_driver(cons con_driver, con_dev_groups, "vtcon%i", con_driver->node); if (IS_ERR(con_driver->dev)) { - printk(KERN_WARNING "Unable to create device for %s; " - "errno = %ld\n", con_driver->desc, - PTR_ERR(con_driver->dev)); + pr_warn("Unable to create device for %s; errno = %ld\n", + con_driver->desc, PTR_ERR(con_driver->dev)); con_driver->dev = NULL; } else { vtconsole_init_device(con_driver); @@@ -3761,8 -3761,8 +3761,8 @@@ static int __init vtconsole_class_init( vtconsole_class = class_create(THIS_MODULE, "vtconsole"); if (IS_ERR(vtconsole_class)) { - printk(KERN_WARNING "Unable to create vt console class; " - "errno = %ld\n", PTR_ERR(vtconsole_class)); + pr_warn("Unable to create vt console class; errno = %ld\n", + PTR_ERR(vtconsole_class)); vtconsole_class = NULL; } @@@ -3778,9 -3778,8 +3778,8 @@@ "vtcon%i", con->node); if (IS_ERR(con->dev)) { - printk(KERN_WARNING "Unable to create " - "device for %s; errno = %ld\n", - con->desc, PTR_ERR(con->dev)); + pr_warn("Unable to create device for %s; errno = %ld\n", + con->desc, PTR_ERR(con->dev)); con->dev = NULL; } else { vtconsole_init_device(con); @@@ -4121,37 -4120,45 +4120,45 @@@ static int con_font_set(struct vc_data return -EINVAL; if (op->charcount > 512) return -EINVAL; + if (op->width <= 0 || op->width > 32 || op->height > 32) + return -EINVAL; + size = (op->width+7)/8 * 32 * op->charcount; + if (size > max_font_size) + return -ENOSPC; + + font.data = memdup_user(op->data, size); + if (IS_ERR(font.data)) + return PTR_ERR(font.data); + if (!op->height) { /* Need to guess font height [compat] */ int h, i; - u8 __user *charmap = op->data; - u8 tmp; - - /* If from KDFONTOP ioctl, don't allow things which can be done in userland, - so that we can get rid of this soon */ - if (!(op->flags & KD_FONT_FLAG_OLD)) + u8 *charmap = font.data; + + /* + * If from KDFONTOP ioctl, don't allow things which can be done + * in userland,so that we can get rid of this soon + */ + if (!(op->flags & KD_FONT_FLAG_OLD)) { + kfree(font.data); return -EINVAL; + } + for (h = 32; h > 0; h--) - for (i = 0; i < op->charcount; i++) { - if (get_user(tmp, &charmap[32*i+h-1])) - return -EFAULT; - if (tmp) + for (i = 0; i < op->charcount; i++) + if (charmap[32*i+h-1]) goto nonzero; - } + + kfree(font.data); return -EINVAL; + nonzero: op->height = h; } - if (op->width <= 0 || op->width > 32 || op->height > 32) - return -EINVAL; - size = (op->width+7)/8 * 32 * op->charcount; - if (size > max_font_size) - return -ENOSPC; + font.charcount = op->charcount; - font.height = op->height; font.width = op->width; - font.data = memdup_user(op->data, size); - if (IS_ERR(font.data)) - return PTR_ERR(font.data); + font.height = op->height; + console_lock(); if (vc->vc_mode != KD_TEXT) rc = -EINVAL; diff --combined fs/proc/proc_tty.c index 2da657848cfc,20e2c18e2b47..d0cf1c50bb6c --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c @@@ -1,4 -1,3 +1,4 @@@ +// SPDX-License-Identifier: GPL-2.0 /* * proc_tty.c -- handles /proc/tty * @@@ -15,6 -14,7 +15,7 @@@ #include #include #include + #include "internal.h" /* * The /proc/tty directory inodes... @@@ -165,7 -165,7 +166,7 @@@ void proc_tty_unregister_driver(struct if (!ent) return; - remove_proc_entry(driver->driver_name, proc_tty_driver); + remove_proc_entry(ent->name, proc_tty_driver); driver->proc_entry = NULL; } diff --combined include/linux/cyclades.h index 83925bd12c0b,3638eb2d52f6..05ee0f19448a --- a/include/linux/cyclades.h +++ b/include/linux/cyclades.h @@@ -1,4 -1,3 +1,4 @@@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Revision: 3.0 $$Date: 1998/11/02 14:20:59 $ * linux/include/linux/cyclades.h * @@@ -157,6 -156,9 +157,9 @@@ struct cyclades_port struct cyclades_icount icount; struct completion shutdown_wait; int throttle; + #ifdef CONFIG_CYZ_INTR + struct timer_list rx_full_timer; + #endif }; #define CLOSING_WAIT_DELAY 30*HZ diff --combined include/uapi/linux/serial_reg.h index 619fe6111dc9,dea05724c760..be07b5470f4b --- a/include/uapi/linux/serial_reg.h +++ b/include/uapi/linux/serial_reg.h @@@ -1,4 -1,3 +1,4 @@@ +/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */ /* * include/linux/serial_reg.h * @@@ -158,6 -157,7 +158,7 @@@ */ #define UART_DLL 0 /* Out: Divisor Latch Low */ #define UART_DLM 1 /* Out: Divisor Latch High */ + #define UART_DIV_MAX 0xFFFF /* Max divisor value */ /* * LCR=0xBF (or DLAB=1 for 16C660)