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/pnx8xxx_uart.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/pnx8xxx_uart.c')
-rw-r--r-- | drivers/tty/serial/pnx8xxx_uart.c | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/drivers/tty/serial/pnx8xxx_uart.c b/drivers/tty/serial/pnx8xxx_uart.c index 2ba24a45c97f..9fd941460e3c 100644 --- a/drivers/tty/serial/pnx8xxx_uart.c +++ b/drivers/tty/serial/pnx8xxx_uart.c @@ -126,7 +126,8 @@ static void pnx8xxx_timeout(unsigned long data) */ static void pnx8xxx_stop_tx(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); u32 ien; /* Disable TX intr */ @@ -142,7 +143,8 @@ static void pnx8xxx_stop_tx(struct uart_port *port) */ static void pnx8xxx_start_tx(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); u32 ien; /* Clear all pending TX intr */ @@ -158,7 +160,8 @@ static void pnx8xxx_start_tx(struct uart_port *port) */ static void pnx8xxx_stop_rx(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); u32 ien; /* Disable RX intr */ @@ -174,7 +177,8 @@ static void pnx8xxx_stop_rx(struct uart_port *port) */ static void pnx8xxx_enable_ms(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); mod_timer(&sport->timer, jiffies); } @@ -313,14 +317,16 @@ static irqreturn_t pnx8xxx_int(int irq, void *dev_id) */ static unsigned int pnx8xxx_tx_empty(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); return serial_in(sport, PNX8XXX_FIFO) & PNX8XXX_UART_FIFO_TXFIFO_STA ? 0 : TIOCSER_TEMT; } static unsigned int pnx8xxx_get_mctrl(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); unsigned int mctrl = TIOCM_DSR; unsigned int msr; @@ -347,7 +353,8 @@ static void pnx8xxx_set_mctrl(struct uart_port *port, unsigned int mctrl) */ static void pnx8xxx_break_ctl(struct uart_port *port, int break_state) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); unsigned long flags; unsigned int lcr; @@ -363,7 +370,8 @@ static void pnx8xxx_break_ctl(struct uart_port *port, int break_state) static int pnx8xxx_startup(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); int retval; /* @@ -397,7 +405,8 @@ static int pnx8xxx_startup(struct uart_port *port) static void pnx8xxx_shutdown(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); int lcr; /* @@ -434,7 +443,8 @@ static void pnx8xxx_set_termios(struct uart_port *port, struct ktermios *termios, struct ktermios *old) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); unsigned long flags; unsigned int lcr_fcr, old_ien, baud, quot; unsigned int old_csize = old ? old->c_cflag & CSIZE : CS8; @@ -551,7 +561,8 @@ pnx8xxx_set_termios(struct uart_port *port, struct ktermios *termios, static const char *pnx8xxx_type(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); return sport->port.type == PORT_PNX8XXX ? "PNX8XXX" : NULL; } @@ -561,7 +572,8 @@ static const char *pnx8xxx_type(struct uart_port *port) */ static void pnx8xxx_release_port(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); release_mem_region(sport->port.mapbase, UART_PORT_SIZE); } @@ -571,7 +583,8 @@ static void pnx8xxx_release_port(struct uart_port *port) */ static int pnx8xxx_request_port(struct uart_port *port) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); return request_mem_region(sport->port.mapbase, UART_PORT_SIZE, "pnx8xxx-uart") != NULL ? 0 : -EBUSY; } @@ -581,7 +594,8 @@ static int pnx8xxx_request_port(struct uart_port *port) */ static void pnx8xxx_config_port(struct uart_port *port, int flags) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); if (flags & UART_CONFIG_TYPE && pnx8xxx_request_port(&sport->port) == 0) @@ -596,7 +610,8 @@ static void pnx8xxx_config_port(struct uart_port *port, int flags) static int pnx8xxx_verify_port(struct uart_port *port, struct serial_struct *ser) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); int ret = 0; if (ser->type != PORT_UNKNOWN && ser->type != PORT_PNX8XXX) @@ -662,7 +677,8 @@ static void __init pnx8xxx_init_ports(void) static void pnx8xxx_console_putchar(struct uart_port *port, int ch) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; + struct pnx8xxx_port *sport = + container_of(port, struct pnx8xxx_port, port); int status; do { |