summaryrefslogtreecommitdiff
path: root/target/linux/amazon/files/drivers/serial/amazon_asc.c
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-28 22:09:18 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-28 22:09:18 +0000
commitd27e7369f5ef5d9c92f94c086be55a33749e366f (patch)
tree484f4390c021833927dc8a75cce8bbb850f7abc2 /target/linux/amazon/files/drivers/serial/amazon_asc.c
parent52df74715be7c6a815a581b88e01bc0b392952f0 (diff)
[amazon] Some general changes for amazon drivers.
This is mostly needed for kernel 2.6.30 support. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18588 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/amazon/files/drivers/serial/amazon_asc.c')
-rw-r--r--target/linux/amazon/files/drivers/serial/amazon_asc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/linux/amazon/files/drivers/serial/amazon_asc.c b/target/linux/amazon/files/drivers/serial/amazon_asc.c
index 7c17cb0f4a..6297549458 100644
--- a/target/linux/amazon/files/drivers/serial/amazon_asc.c
+++ b/target/linux/amazon/files/drivers/serial/amazon_asc.c
@@ -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;