Staging: rspiusb: Fix buffer overflow
[safe/jmp/linux-2.6] / drivers / serial / sn_console.c
index 41fc612..d5276c0 100644 (file)
@@ -61,7 +61,7 @@
 #define SN_SAL_BUFFER_SIZE (64 * (1 << 10))
 
 #define SN_SAL_UART_FIFO_DEPTH 16
-#define SN_SAL_UART_FIFO_SPEED_CPS 9600/10
+#define SN_SAL_UART_FIFO_SPEED_CPS (9600/10)
 
 /* sn_transmit_chars() calling args */
 #define TRANSMIT_BUFFERED      0
@@ -471,7 +471,7 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
 
        if (port->sc_port.info) {
                /* The serial_core stuffs are initilized, use them */
-               tty = port->sc_port.info->tty;
+               tty = port->sc_port.info->port.tty;
        }
        else {
                /* Not registered yet - can't pass to tty layer.  */
@@ -839,7 +839,7 @@ static int __init sn_sal_module_init(void)
 
        if (uart_add_one_port(&sal_console_uart, &sal_console_port.sc_port) < 0) {
                /* error - not sure what I'd do - so I'll do nothing */
-               printk(KERN_ERR "%s: unable to add port\n", __FUNCTION__);
+               printk(KERN_ERR "%s: unable to add port\n", __func__);
        }
 
        /* when this driver is compiled in, the console initialization