mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [M68KNOMMU]: cleanup port field access from uart struct in Coldfire serial driver
@ 2007-10-30  4:41 Greg Ungerer
  0 siblings, 0 replies; only message in thread
From: Greg Ungerer @ 2007-10-30  4:41 UTC (permalink / raw)
  To: torvalds; +Cc: gerg, linux-kernel

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 <gerg@uclinux.org>
---

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) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-30  4:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-30  4:41 [M68KNOMMU]: cleanup port field access from uart struct in Coldfire serial driver Greg Ungerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®