aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-01-21 10:14:38 -0500
committerPaul Mundt <lethal@linux-sh.org>2009-05-08 10:04:21 -0400
commita5660adae85918f2ab6b10ab58e2f574c1bd5ce1 (patch)
tree132203befb19cb66e430aec8cec71b274e298c4e
parentdc8e6f5bfcd6a307a8196d3e41fd9798be5a1c76 (diff)
sh-sci: use to_sci_port() if possible
Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--drivers/serial/sh-sci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index d2cd1a400c12..17fa7f17bbe3 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -618,7 +618,7 @@ static inline int sci_handle_breaks(struct uart_port *port)
618 int copied = 0; 618 int copied = 0;
619 unsigned short status = sci_in(port, SCxSR); 619 unsigned short status = sci_in(port, SCxSR);
620 struct tty_struct *tty = port->info->port.tty; 620 struct tty_struct *tty = port->info->port.tty;
621 struct sci_port *s = &sci_ports[port->line]; 621 struct sci_port *s = to_sci_port(port);
622 622
623 if (uart_handle_break(port)) 623 if (uart_handle_break(port))
624 return 0; 624 return 0;
@@ -875,7 +875,7 @@ static void sci_break_ctl(struct uart_port *port, int break_state)
875 875
876static int sci_startup(struct uart_port *port) 876static int sci_startup(struct uart_port *port)
877{ 877{
878 struct sci_port *s = &sci_ports[port->line]; 878 struct sci_port *s = to_sci_port(port);
879 879
880 if (s->enable) 880 if (s->enable)
881 s->enable(port); 881 s->enable(port);
@@ -893,7 +893,7 @@ static int sci_startup(struct uart_port *port)
893 893
894static void sci_shutdown(struct uart_port *port) 894static void sci_shutdown(struct uart_port *port)
895{ 895{
896 struct sci_port *s = &sci_ports[port->line]; 896 struct sci_port *s = to_sci_port(port);
897 897
898 sci_stop_rx(port); 898 sci_stop_rx(port);
899 sci_stop_tx(port); 899 sci_stop_tx(port);
@@ -990,7 +990,7 @@ static int sci_request_port(struct uart_port *port)
990 990
991static void sci_config_port(struct uart_port *port, int flags) 991static void sci_config_port(struct uart_port *port, int flags)
992{ 992{
993 struct sci_port *s = &sci_ports[port->line]; 993 struct sci_port *s = to_sci_port(port);
994 994
995 port->type = s->type; 995 port->type = s->type;
996 996
@@ -1002,7 +1002,7 @@ static void sci_config_port(struct uart_port *port, int flags)
1002 1002
1003static int sci_verify_port(struct uart_port *port, struct serial_struct *ser) 1003static int sci_verify_port(struct uart_port *port, struct serial_struct *ser)
1004{ 1004{
1005 struct sci_port *s = &sci_ports[port->line]; 1005 struct sci_port *s = to_sci_port(port);
1006 1006
1007 if (ser->irq != s->irqs[SCIx_TXI_IRQ] || ser->irq > nr_irqs) 1007 if (ser->irq != s->irqs[SCIx_TXI_IRQ] || ser->irq > nr_irqs)
1008 return -EINVAL; 1008 return -EINVAL;