[amazon] Some general changes for amazon drivers.
[openwrt-10.03/.git] / target / linux / amazon / files / drivers / serial / amazon_asc.c
index 7c17cb0f4a728f166c246011a05b844c1a3c0d8f..62975494583d08b185de284216eacf5e3088f7ce 100644 (file)
@@ -102,10 +102,16 @@ static void amazonasc_enable_ms(struct uart_port *port)
        return;
 }
 
+#include <linux/version.h>
+
 static void
 amazonasc_rx_chars(struct uart_port *port)
 {
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 26))
+       struct tty_struct *tty = port->info->port.tty;
+#else
        struct tty_struct *tty = port->info->tty;
+#endif
        unsigned int ch = 0, rsr = 0, fifocnt;
 
        fifocnt = amazon_readl(AMAZON_ASC_FSTAT) & ASCFSTAT_RXFFLMASK;