xhci-dbgtty.c (dcaafbe6ee3b39f2df11a1352f85172f8ade17a5) | xhci-dbgtty.c (95713967ba52389f7cea75704d0cf048080ec218) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * xhci-dbgtty.c - tty glue for xHCI debug capability 4 * 5 * Copyright (C) 2017 Intel Corporation 6 * 7 * Author: Lu Baolu <baolu.lu@linux.intel.com> 8 */ --- 194 unchanged lines hidden (view full) --- 203 204static void dbc_tty_close(struct tty_struct *tty, struct file *file) 205{ 206 struct dbc_port *port = tty->driver_data; 207 208 tty_port_close(&port->port, tty, file); 209} 210 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * xhci-dbgtty.c - tty glue for xHCI debug capability 4 * 5 * Copyright (C) 2017 Intel Corporation 6 * 7 * Author: Lu Baolu <baolu.lu@linux.intel.com> 8 */ --- 194 unchanged lines hidden (view full) --- 203 204static void dbc_tty_close(struct tty_struct *tty, struct file *file) 205{ 206 struct dbc_port *port = tty->driver_data; 207 208 tty_port_close(&port->port, tty, file); 209} 210 |
211static int dbc_tty_write(struct tty_struct *tty, const u8 *buf, int count) | 211static ssize_t dbc_tty_write(struct tty_struct *tty, const u8 *buf, 212 size_t count) |
212{ 213 struct dbc_port *port = tty->driver_data; 214 unsigned long flags; 215 216 spin_lock_irqsave(&port->port_lock, flags); 217 if (count) 218 count = kfifo_in(&port->write_fifo, buf, count); 219 dbc_start_tx(port); --- 361 unchanged lines hidden --- | 213{ 214 struct dbc_port *port = tty->driver_data; 215 unsigned long flags; 216 217 spin_lock_irqsave(&port->port_lock, flags); 218 if (count) 219 count = kfifo_in(&port->write_fifo, buf, count); 220 dbc_start_tx(port); --- 361 unchanged lines hidden --- |