diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 15:23:32 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 15:23:32 -0800 |
commit | 37da7bbbe84fe9e8862940d3f9194fd27dce59bb (patch) | |
tree | 6c3fae910b4cfd4e2f9a1fdc035400cd4df78be3 /drivers/tty/serial/sunsab.c | |
parent | e7cf773d431a63a2417902696fcc9e0ebdc83bbe (diff) | |
parent | dd63af108f0814f0b589659f4e55a7a5af3b7e53 (diff) |
Merge tag 'tty-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver updates from Greg KH:
"Here's the big tty/serial driver update for 3.19-rc1.
There are a number of TTY core changes/fixes in here from Peter Hurley
that have all been teted in linux-next for a long time now. There are
also the normal serial driver updates as well, full details in the
changelog below"
* tag 'tty-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (219 commits)
serial: pxa: hold port.lock when reporting modem line changes
tty-hvsi_lib: Deletion of an unnecessary check before the function call "tty_kref_put"
tty: Deletion of unnecessary checks before two function calls
n_tty: Fix read_buf race condition, increment read_head after pushing data
serial: of-serial: add PM suspend/resume support
Revert "serial: of-serial: add PM suspend/resume support"
Revert "serial: of-serial: fix up PM ops on no_console_suspend and port type"
serial: 8250: don't attempt a trylock if in sysrq
serial: core: Add big-endian iotype
serial: samsung: use port->fifosize instead of hardcoded values
serial: samsung: prefer to use fifosize from driver data
serial: samsung: fix style problems
serial: samsung: wait for transfer completion before clock disable
serial: icom: fix error return code
serial: tegra: clean up tty-flag assignments
serial: Fix io address assign flow with Fintek PCI-to-UART Product
serial: mxs-auart: fix tx_empty against shift register
serial: mxs-auart: fix gpio change detection on interrupt
serial: mxs-auart: Fix mxs_auart_set_ldisc()
serial: 8250_dw: Use 64-bit access for OCTEON.
...
Diffstat (limited to 'drivers/tty/serial/sunsab.c')
-rw-r--r-- | drivers/tty/serial/sunsab.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index b339fe4811cd..e3b43a449d46 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -345,7 +345,8 @@ static irqreturn_t sunsab_interrupt(int irq, void *dev_id) /* port->lock is not held. */ static unsigned int sunsab_tx_empty(struct uart_port *port) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); int ret; /* Do not need a lock for a state test like this. */ @@ -360,7 +361,8 @@ static unsigned int sunsab_tx_empty(struct uart_port *port) /* port->lock held by caller. */ static void sunsab_set_mctrl(struct uart_port *port, unsigned int mctrl) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); if (mctrl & TIOCM_RTS) { up->cached_mode &= ~SAB82532_MODE_FRTS; @@ -383,7 +385,8 @@ static void sunsab_set_mctrl(struct uart_port *port, unsigned int mctrl) /* port->lock is held by caller and interrupts are disabled. */ static unsigned int sunsab_get_mctrl(struct uart_port *port) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); unsigned char val; unsigned int result; @@ -404,7 +407,8 @@ static unsigned int sunsab_get_mctrl(struct uart_port *port) /* port->lock held by caller. */ static void sunsab_stop_tx(struct uart_port *port) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); up->interrupt_mask1 |= SAB82532_IMR1_XPR; writeb(up->interrupt_mask1, &up->regs->w.imr1); @@ -432,7 +436,8 @@ static void sunsab_tx_idle(struct uart_sunsab_port *up) /* port->lock held by caller. */ static void sunsab_start_tx(struct uart_port *port) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); struct circ_buf *xmit = &up->port.state->xmit; int i; @@ -465,7 +470,8 @@ static void sunsab_start_tx(struct uart_port *port) /* port->lock is not held. */ static void sunsab_send_xchar(struct uart_port *port, char ch) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); unsigned long flags; if (ch == __DISABLED_CHAR) @@ -482,7 +488,8 @@ static void sunsab_send_xchar(struct uart_port *port, char ch) /* port->lock held by caller. */ static void sunsab_stop_rx(struct uart_port *port) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); up->interrupt_mask0 |= SAB82532_IMR0_TCD; writeb(up->interrupt_mask1, &up->regs->w.imr0); @@ -491,7 +498,8 @@ static void sunsab_stop_rx(struct uart_port *port) /* port->lock is not held. */ static void sunsab_break_ctl(struct uart_port *port, int break_state) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); unsigned long flags; unsigned char val; @@ -514,7 +522,8 @@ static void sunsab_break_ctl(struct uart_port *port, int break_state) /* port->lock is not held. */ static int sunsab_startup(struct uart_port *port) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); unsigned long flags; unsigned char tmp; int err = request_irq(up->port.irq, sunsab_interrupt, @@ -585,7 +594,8 @@ static int sunsab_startup(struct uart_port *port) /* port->lock is not held. */ static void sunsab_shutdown(struct uart_port *port) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); unsigned long flags; spin_lock_irqsave(&up->port.lock, flags); @@ -771,7 +781,8 @@ static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cfla static void sunsab_set_termios(struct uart_port *port, struct ktermios *termios, struct ktermios *old) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); unsigned long flags; unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000); unsigned int quot = uart_get_divisor(port, baud); @@ -840,7 +851,8 @@ static struct uart_sunsab_port *sunsab_ports; static void sunsab_console_putchar(struct uart_port *port, int c) { - struct uart_sunsab_port *up = (struct uart_sunsab_port *)port; + struct uart_sunsab_port *up = + container_of(port, struct uart_sunsab_port, port); sunsab_tec_wait(up); writeb(c, &up->regs->w.tic); |