Use port field instead of silly struct/pointer casting to get at
port struct from local uart struct in ColdFire serial driver.
Signed-off-by: Greg Ungerer <[email protected]>
---
diff -Naurp linux-2.6.23-rc1/drivers/serial/mcf.c linux-2.6.23-rc1.platform/drivers/serial/mcf.c
--- linux-2.6.23-rc1/drivers/serial/mcf.c 2007-10-25 10:49:13.000000000 +1000
+++ linux-2.6.23-rc1.platform/drivers/serial/mcf.c 2007-10-30 11:18:30.000000000 +1000
@@ -273,7 +273,7 @@ static void mcf_set_termios(struct uart_
static void mcf_rx_chars(struct mcf_uart *pp)
{
- struct uart_port *port = (struct uart_port *) pp;
+ struct uart_port *port = &pp->port;
unsigned char status, ch, flag;
while ((status = readb(port->membase + MCFUART_USR)) & MCFUART_USR_RXREADY) {
@@ -319,7 +319,7 @@ static void mcf_rx_chars(struct mcf_uart
static void mcf_tx_chars(struct mcf_uart *pp)
{
- struct uart_port *port = (struct uart_port *) pp;
+ struct uart_port *port = &pp->port;
struct circ_buf *xmit = &port->info->xmit;
if (port->x_char) {