diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-15 02:23:32 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-15 02:23:32 +0300 |
commit | 37da7bbbe84fe9e8862940d3f9194fd27dce59bb (patch) | |
tree | 6c3fae910b4cfd4e2f9a1fdc035400cd4df78be3 /drivers/tty/serial/cpm_uart | |
parent | e7cf773d431a63a2417902696fcc9e0ebdc83bbe (diff) | |
parent | dd63af108f0814f0b589659f4e55a7a5af3b7e53 (diff) | |
download | linux-37da7bbbe84fe9e8862940d3f9194fd27dce59bb.tar.xz |
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/cpm_uart')
-rw-r--r-- | drivers/tty/serial/cpm_uart/cpm_uart_core.c | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c index 533852eb8778..638afd35c547 100644 --- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c @@ -80,7 +80,8 @@ static void cpm_uart_initbd(struct uart_cpm_port *pinfo); */ static unsigned int cpm_uart_tx_empty(struct uart_port *port) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); cbd_t __iomem *bdp = pinfo->tx_bd_base; int ret = 0; @@ -102,7 +103,8 @@ static unsigned int cpm_uart_tx_empty(struct uart_port *port) static void cpm_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); if (pinfo->gpios[GPIO_RTS] >= 0) gpio_set_value(pinfo->gpios[GPIO_RTS], !(mctrl & TIOCM_RTS)); @@ -113,7 +115,8 @@ static void cpm_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) static unsigned int cpm_uart_get_mctrl(struct uart_port *port) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); unsigned int mctrl = TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; if (pinfo->gpios[GPIO_CTS] >= 0) { @@ -144,7 +147,8 @@ static unsigned int cpm_uart_get_mctrl(struct uart_port *port) */ static void cpm_uart_stop_tx(struct uart_port *port) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); smc_t __iomem *smcp = pinfo->smcp; scc_t __iomem *sccp = pinfo->sccp; @@ -161,7 +165,8 @@ static void cpm_uart_stop_tx(struct uart_port *port) */ static void cpm_uart_start_tx(struct uart_port *port) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); smc_t __iomem *smcp = pinfo->smcp; scc_t __iomem *sccp = pinfo->sccp; @@ -189,7 +194,8 @@ static void cpm_uart_start_tx(struct uart_port *port) */ static void cpm_uart_stop_rx(struct uart_port *port) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); smc_t __iomem *smcp = pinfo->smcp; scc_t __iomem *sccp = pinfo->sccp; @@ -206,7 +212,8 @@ static void cpm_uart_stop_rx(struct uart_port *port) */ static void cpm_uart_break_ctl(struct uart_port *port, int break_state) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); pr_debug("CPM uart[%d]:break ctrl, break_state: %d\n", port->line, break_state); @@ -240,7 +247,8 @@ static void cpm_uart_int_rx(struct uart_port *port) unsigned char ch; u8 *cp; struct tty_port *tport = &port->state->port; - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); cbd_t __iomem *bdp; u16 status; unsigned int flg; @@ -397,7 +405,8 @@ static irqreturn_t cpm_uart_int(int irq, void *data) static int cpm_uart_startup(struct uart_port *port) { int retval; - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); pr_debug("CPM uart[%d]:startup\n", port->line); @@ -442,7 +451,8 @@ inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo) */ static void cpm_uart_shutdown(struct uart_port *port) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); pr_debug("CPM uart[%d]:shutdown\n", port->line); @@ -492,7 +502,8 @@ static void cpm_uart_set_termios(struct uart_port *port, unsigned long flags; u16 cval, scval, prev_mode; int bits, sbits; - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); smc_t __iomem *smcp = pinfo->smcp; scc_t __iomem *sccp = pinfo->sccp; int maxidl; @@ -675,7 +686,8 @@ static int cpm_uart_tx_pump(struct uart_port *port) cbd_t __iomem *bdp; u8 *p; int count; - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); struct circ_buf *xmit = &port->state->xmit; /* Handle xon/xoff */ @@ -906,7 +918,8 @@ static void cpm_uart_init_smc(struct uart_cpm_port *pinfo) */ static int cpm_uart_request_port(struct uart_port *port) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); int ret; pr_debug("CPM uart[%d]:request port\n", port->line); @@ -938,7 +951,8 @@ static int cpm_uart_request_port(struct uart_port *port) static void cpm_uart_release_port(struct uart_port *port) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); if (!(pinfo->flags & FLAG_CONSOLE)) cpm_uart_freebuf(pinfo); @@ -1082,7 +1096,8 @@ static int poll_wait_key(char *obuf, struct uart_cpm_port *pinfo) static int cpm_get_poll_char(struct uart_port *port) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); if (!serial_polled) { serial_polled = 1; @@ -1099,7 +1114,8 @@ static int cpm_get_poll_char(struct uart_port *port) static void cpm_put_poll_char(struct uart_port *port, unsigned char c) { - struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; + struct uart_cpm_port *pinfo = + container_of(port, struct uart_cpm_port, port); static char ch[2]; ch[0] = (char)c; |