summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250_omap.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2016-02-18 21:22:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-07 16:11:14 -0800
commit013e3586d84bfe9f6b4b44eecdc3842978644d78 (patch)
treecbe0b77ab4dda5d7a2c964fb3465b973b905269b /drivers/tty/serial/8250/8250_omap.c
parent3f5921a60f74e3f3ac975884759208cb9497b461 (diff)
downloadlinux-013e3586d84bfe9f6b4b44eecdc3842978644d78.tar.bz2
serial: 8250: convert drivers to use up_to_u8250p()
up_to_u8250p() casts struct uart_port * to struct uart_8250_port *. Update code to use it instead of open coded variant. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_omap.c')
-rw-r--r--drivers/tty/serial/8250/8250_omap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index d710985a2e4f..6f760510e46d 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -318,8 +318,7 @@ static void omap_8250_set_termios(struct uart_port *port,
struct ktermios *termios,
struct ktermios *old)
{
- struct uart_8250_port *up =
- container_of(port, struct uart_8250_port, port);
+ struct uart_8250_port *up = up_to_u8250p(port);
struct omap8250_priv *priv = up->port.private_data;
unsigned char cval = 0;
unsigned int baud;
@@ -682,9 +681,8 @@ static void omap_8250_shutdown(struct uart_port *port)
static void omap_8250_throttle(struct uart_port *port)
{
+ struct uart_8250_port *up = up_to_u8250p(port);
unsigned long flags;
- struct uart_8250_port *up =
- container_of(port, struct uart_8250_port, port);
pm_runtime_get_sync(port->dev);
@@ -729,9 +727,8 @@ static int omap_8250_rs485_config(struct uart_port *port,
static void omap_8250_unthrottle(struct uart_port *port)
{
+ struct uart_8250_port *up = up_to_u8250p(port);
unsigned long flags;
- struct uart_8250_port *up =
- container_of(port, struct uart_8250_port, port);
pm_runtime_get_sync(port->dev);