MN10300: ttySM: clean up unnecessary casting
authorMark Salter <msalter@redhat.com>
Wed, 12 Dec 2012 15:36:38 +0000 (15:36 +0000)
committerDavid Howells <dhowells@redhat.com>
Wed, 12 Dec 2012 15:46:14 +0000 (15:46 +0000)
The ttySM uart data register pointers are declared as void* pointers. Change
them to u8* pointers so we don't need to use casts in the code.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
arch/mn10300/kernel/mn10300-serial.c
arch/mn10300/kernel/mn10300-serial.h

index 587545cb7e4c82ed3884928f148fed445a784259..b7b5a4c270f5de3dc93341757837ae002d07a410 100644 (file)
@@ -1629,12 +1629,12 @@ static void mn10300_serial_console_write(struct console *co,
 
                while (*port->_status & SC01STR_TBF)
                        continue;
-               *(u8 *) port->_txb = ch;
+               *port->_txb = ch;
 
                if (ch == 0x0a) {
                        while (*port->_status & SC01STR_TBF)
                                continue;
-                       *(u8 *) port->_txb = 0xd;
+                       *port->_txb = 0xd;
                }
        }
 
@@ -1759,12 +1759,12 @@ static void mn10300_serial_poll_put_char(struct uart_port *_port,
        tmp = *port->_intr;
 
        if (ch == 0x0a) {
-               *(u8 *) port->_txb = 0x0d;
+               *port->_txb = 0x0d;
                while (*port->_status & SC01STR_TBF)
                        continue;
        }
 
-       *(u8 *) port->_txb = ch;
+       *port->_txb = ch;
        while (*port->_status & SC01STR_TBF)
                continue;
 
index 0004e61619a5831740e9b413433cfe7b8eee4099..01791c68ea1f1330894e71f41f1ded0131d82e93 100644 (file)
@@ -58,8 +58,8 @@ struct mn10300_serial_port {
        volatile u16            *_control;      /* control register pointer */
        volatile u8             *_status;       /* status register pointer */
        volatile u8             *_intr;         /* interrupt register pointer */
-       volatile void           *_rxb;          /* receive buffer register pointer */
-       volatile void           *_txb;          /* transmit buffer register pointer */
+       volatile u8             *_rxb;          /* receive buffer register pointer */
+       volatile u8             *_txb;          /* transmit buffer register pointer */
        volatile u16            *_tmicr;        /* timer interrupt control register */
        volatile u8             *_tmxmd;        /* baud rate timer mode register */
        volatile u16            *_tmxbr;        /* baud rate timer base register */