From 92a19f9cec9a80ad93c06e115822deb729e2c6ad Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 3 Jan 2013 15:53:03 +0100 Subject: [PATCH] TTY: switch tty_insert_flip_char Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. tty_insert_flip_char is the next one to proceed. This one is used all over the code, so the patch is huge. Signed-off-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman [[ stefanr: only staging/fwserial bits included here ]] --- arch/alpha/kernel/srmcons.c | 3 ++- arch/ia64/hp/sim/simserial.c | 3 ++- arch/mn10300/kernel/mn10300-serial.c | 4 +-- arch/parisc/kernel/pdc_cons.c | 2 +- arch/um/drivers/chan_kern.c | 8 +----- arch/xtensa/platforms/iss/console.c | 3 ++- drivers/char/pcmcia/synclink_cs.c | 2 +- drivers/ipack/devices/ipoctal.c | 5 ++-- drivers/isdn/i4l/isdn_common.c | 8 +++--- drivers/isdn/i4l/isdn_tty.c | 12 ++++----- drivers/mmc/card/sdio_uart.c | 5 ++-- drivers/s390/char/con3215.c | 3 ++- drivers/s390/char/keyboard.h | 4 +-- drivers/s390/char/sclp_tty.c | 4 +-- drivers/staging/dgrp/dgrp_net_ops.c | 2 +- drivers/staging/fwserial/fwserial.c | 2 +- drivers/staging/serqt_usb2/serqt_usb2.c | 13 +++++---- drivers/tty/amiserial.c | 4 +-- drivers/tty/cyclades.c | 24 ++++++++--------- drivers/tty/hvc/hvc_console.c | 2 +- drivers/tty/hvc/hvsi.c | 22 +++++++-------- drivers/tty/isicom.c | 4 +-- drivers/tty/moxa.c | 2 +- drivers/tty/mxser.c | 4 +-- drivers/tty/n_gsm.c | 24 ++++++++++------- drivers/tty/nozomi.c | 2 +- drivers/tty/rocket.c | 3 ++- drivers/tty/serial/68328serial.c | 2 +- drivers/tty/serial/ar933x_uart.c | 10 +++---- drivers/tty/serial/bcm63xx_uart.c | 7 ++--- drivers/tty/serial/bfin_sport_uart.c | 10 ++++--- drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +- drivers/tty/serial/crisv10.c | 10 +++---- drivers/tty/serial/efm32-uart.c | 15 +++++------ drivers/tty/serial/icom.c | 7 ++--- drivers/tty/serial/imx.c | 4 ++- drivers/tty/serial/jsm/jsm_tty.c | 8 +++--- drivers/tty/serial/kgdb_nmi.c | 2 +- drivers/tty/serial/lantiq.c | 7 ++--- drivers/tty/serial/lpc32xx_hs.c | 12 +++++---- drivers/tty/serial/m32r_sio.c | 7 ++--- drivers/tty/serial/mpc52xx_uart.c | 7 ++--- drivers/tty/serial/mpsc.c | 4 +-- drivers/tty/serial/msm_serial.c | 12 +++++---- drivers/tty/serial/msm_serial_hs.c | 12 ++++----- drivers/tty/serial/mux.c | 5 ++-- drivers/tty/serial/nwpserial.c | 5 ++-- drivers/tty/serial/pmac_zilog.c | 8 +++--- drivers/tty/serial/sc26xx.c | 10 ++++--- drivers/tty/serial/serial_core.c | 6 ++--- drivers/tty/serial/sh-sci.c | 34 ++++++++++++----------- drivers/tty/serial/sn_console.c | 6 +++-- drivers/tty/serial/sunhv.c | 4 +-- drivers/tty/serial/sunsab.c | 16 +++++------ drivers/tty/serial/sunsu.c | 7 ++--- drivers/tty/serial/sunzilog.c | 17 +++++------- drivers/tty/serial/timbuart.c | 4 +-- drivers/tty/serial/uartlite.c | 8 +++--- drivers/tty/serial/ucc_uart.c | 4 +-- drivers/tty/serial/vt8500_serial.c | 7 ++--- drivers/tty/synclink.c | 4 +-- drivers/tty/synclink_gt.c | 8 +++--- drivers/tty/synclinkmp.c | 42 +++++++++++++---------------- drivers/tty/vt/keyboard.c | 6 ++--- drivers/tty/vt/vt.c | 2 +- drivers/usb/serial/ark3116.c | 2 +- drivers/usb/serial/belkin_sa.c | 2 +- drivers/usb/serial/digi_acceleport.c | 2 +- drivers/usb/serial/f81232.c | 5 ++-- drivers/usb/serial/ftdi_sio.c | 11 ++++---- drivers/usb/serial/generic.c | 2 +- drivers/usb/serial/keyspan.c | 21 ++++++++------- drivers/usb/serial/pl2303.c | 5 ++-- drivers/usb/serial/spcp8x5.c | 2 +- drivers/usb/serial/ssu100.c | 10 +++---- include/linux/tty_flip.h | 6 ++--- 76 files changed, 297 insertions(+), 286 deletions(-) diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 85dbdc1..a2a0c43 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c @@ -617,7 +617,7 @@ static int fwtty_rx(struct fwtty_port *port, unsigned char *data, size_t len) lsr &= port->status_mask; if (lsr & ~port->ignore_mask & UART_LSR_OE) { - if (!tty_insert_flip_char(tty, 0, TTY_OVERRUN)) { + if (!tty_insert_flip_char(&port->port, 0, TTY_OVERRUN)) { err = -EIO; goto out; }