aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/amazon/files/drivers/serial
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2010-01-31 15:13:14 +0000
committerHauke Mehrtens <hauke@openwrt.org>2010-01-31 15:13:14 +0000
commit843e03a3de918aebde2a658fa78a0971cc2e8b27 (patch)
tree27731687737b50409ca90775e87b89375fd0a118 /target/linux/amazon/files/drivers/serial
parent69471a1f9606e9b154bdd3b61d69c686cbe74980 (diff)
downloadmaster-187ad058-843e03a3de918aebde2a658fa78a0971cc2e8b27.tar.gz
master-187ad058-843e03a3de918aebde2a658fa78a0971cc2e8b27.tar.bz2
master-187ad058-843e03a3de918aebde2a658fa78a0971cc2e8b27.zip
[amazon] Add kernel 2.6.32 support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19458 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/amazon/files/drivers/serial')
-rw-r--r--target/linux/amazon/files/drivers/serial/amazon_asc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/target/linux/amazon/files/drivers/serial/amazon_asc.c b/target/linux/amazon/files/drivers/serial/amazon_asc.c
index f7fa907b00..fe7050c790 100644
--- a/target/linux/amazon/files/drivers/serial/amazon_asc.c
+++ b/target/linux/amazon/files/drivers/serial/amazon_asc.c
@@ -108,10 +108,10 @@ static void amazonasc_enable_ms(struct uart_port *port)
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;
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 31))
+ struct tty_struct *tty = port->state->port.tty;
#else
- struct tty_struct *tty = port->info->tty;
+ struct tty_struct *tty = port->info->port.tty;
#endif
unsigned int ch = 0, rsr = 0, fifocnt;
@@ -169,7 +169,11 @@ amazonasc_rx_chars(struct uart_port *port)
static void amazonasc_tx_chars(struct uart_port *port)
{
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 31))
+ struct circ_buf *xmit = &port->state->xmit;
+#else
struct circ_buf *xmit = &port->info->xmit;
+#endif
if (uart_tx_stopped(port)) {
amazonasc_stop_tx(port);
@@ -679,7 +683,7 @@ static int __init amazon_asc_probe(struct platform_device *dev)
return res;
}
-static int __exit amazon_asc_remove(struct platform_device *dev)
+static int amazon_asc_remove(struct platform_device *dev)
{
uart_unregister_driver(&amazonasc_reg);
return 0;