aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/mcf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/mcf.c')
-rw-r--r--drivers/serial/mcf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
index a7d4360ea7df..051fcc2f5ba8 100644
--- a/drivers/serial/mcf.c
+++ b/drivers/serial/mcf.c
@@ -69,7 +69,7 @@ static unsigned int mcf_tx_empty(struct uart_port *port)
69 69
70static unsigned int mcf_get_mctrl(struct uart_port *port) 70static unsigned int mcf_get_mctrl(struct uart_port *port)
71{ 71{
72 struct mcf_uart *pp = (struct mcf_uart *) port; 72 struct mcf_uart *pp = container_of(port, struct mcf_uart, port);
73 unsigned long flags; 73 unsigned long flags;
74 unsigned int sigs; 74 unsigned int sigs;
75 75
@@ -87,7 +87,7 @@ static unsigned int mcf_get_mctrl(struct uart_port *port)
87 87
88static void mcf_set_mctrl(struct uart_port *port, unsigned int sigs) 88static void mcf_set_mctrl(struct uart_port *port, unsigned int sigs)
89{ 89{
90 struct mcf_uart *pp = (struct mcf_uart *) port; 90 struct mcf_uart *pp = container_of(port, struct mcf_uart, port);
91 unsigned long flags; 91 unsigned long flags;
92 92
93 spin_lock_irqsave(&port->lock, flags); 93 spin_lock_irqsave(&port->lock, flags);
@@ -104,7 +104,7 @@ static void mcf_set_mctrl(struct uart_port *port, unsigned int sigs)
104 104
105static void mcf_start_tx(struct uart_port *port) 105static void mcf_start_tx(struct uart_port *port)
106{ 106{
107 struct mcf_uart *pp = (struct mcf_uart *) port; 107 struct mcf_uart *pp = container_of(port, struct mcf_uart, port);
108 unsigned long flags; 108 unsigned long flags;
109 109
110 spin_lock_irqsave(&port->lock, flags); 110 spin_lock_irqsave(&port->lock, flags);
@@ -117,7 +117,7 @@ static void mcf_start_tx(struct uart_port *port)
117 117
118static void mcf_stop_tx(struct uart_port *port) 118static void mcf_stop_tx(struct uart_port *port)
119{ 119{
120 struct mcf_uart *pp = (struct mcf_uart *) port; 120 struct mcf_uart *pp = container_of(port, struct mcf_uart, port);
121 unsigned long flags; 121 unsigned long flags;
122 122
123 spin_lock_irqsave(&port->lock, flags); 123 spin_lock_irqsave(&port->lock, flags);
@@ -130,7 +130,7 @@ static void mcf_stop_tx(struct uart_port *port)
130 130
131static void mcf_stop_rx(struct uart_port *port) 131static void mcf_stop_rx(struct uart_port *port)
132{ 132{
133 struct mcf_uart *pp = (struct mcf_uart *) port; 133 struct mcf_uart *pp = container_of(port, struct mcf_uart, port);
134 unsigned long flags; 134 unsigned long flags;
135 135
136 spin_lock_irqsave(&port->lock, flags); 136 spin_lock_irqsave(&port->lock, flags);
@@ -163,7 +163,7 @@ static void mcf_enable_ms(struct uart_port *port)
163 163
164static int mcf_startup(struct uart_port *port) 164static int mcf_startup(struct uart_port *port)
165{ 165{
166 struct mcf_uart *pp = (struct mcf_uart *) port; 166 struct mcf_uart *pp = container_of(port, struct mcf_uart, port);
167 unsigned long flags; 167 unsigned long flags;
168 168
169 spin_lock_irqsave(&port->lock, flags); 169 spin_lock_irqsave(&port->lock, flags);
@@ -189,7 +189,7 @@ static int mcf_startup(struct uart_port *port)
189 189
190static void mcf_shutdown(struct uart_port *port) 190static void mcf_shutdown(struct uart_port *port)
191{ 191{
192 struct mcf_uart *pp = (struct mcf_uart *) port; 192 struct mcf_uart *pp = container_of(port, struct mcf_uart, port);
193 unsigned long flags; 193 unsigned long flags;
194 194
195 spin_lock_irqsave(&port->lock, flags); 195 spin_lock_irqsave(&port->lock, flags);
@@ -273,7 +273,7 @@ static void mcf_set_termios(struct uart_port *port, struct ktermios *termios,
273 273
274static void mcf_rx_chars(struct mcf_uart *pp) 274static void mcf_rx_chars(struct mcf_uart *pp)
275{ 275{
276 struct uart_port *port = (struct uart_port *) pp; 276 struct uart_port *port = &pp->port;
277 unsigned char status, ch, flag; 277 unsigned char status, ch, flag;
278 278
279 while ((status = readb(port->membase + MCFUART_USR)) & MCFUART_USR_RXREADY) { 279 while ((status = readb(port->membase + MCFUART_USR)) & MCFUART_USR_RXREADY) {
@@ -319,7 +319,7 @@ static void mcf_rx_chars(struct mcf_uart *pp)
319 319
320static void mcf_tx_chars(struct mcf_uart *pp) 320static void mcf_tx_chars(struct mcf_uart *pp)
321{ 321{
322 struct uart_port *port = (struct uart_port *) pp; 322 struct uart_port *port = &pp->port;
323 struct circ_buf *xmit = &port->info->xmit; 323 struct circ_buf *xmit = &port->info->xmit;
324 324
325 if (port->x_char) { 325 if (port->x_char) {
@@ -352,7 +352,7 @@ static void mcf_tx_chars(struct mcf_uart *pp)
352static irqreturn_t mcf_interrupt(int irq, void *data) 352static irqreturn_t mcf_interrupt(int irq, void *data)
353{ 353{
354 struct uart_port *port = data; 354 struct uart_port *port = data;
355 struct mcf_uart *pp = (struct mcf_uart *) port; 355 struct mcf_uart *pp = container_of(port, struct mcf_uart, port);
356 unsigned int isr; 356 unsigned int isr;
357 357
358 isr = readb(port->membase + MCFUART_UISR) & pp->imr; 358 isr = readb(port->membase + MCFUART_UISR) & pp->imr;