projects
/
openwrt
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add kernel 2.6.32 support
[openwrt/openwrt.git]
/
target
/
linux
/
amazon
/
files
/
drivers
/
serial
/
amazon_asc.c
diff --git
a/target/linux/amazon/files/drivers/serial/amazon_asc.c
b/target/linux/amazon/files/drivers/serial/amazon_asc.c
index f7fa907b00a241e6e4318918fb9f239b9de2a3f8..fe7050c790c2cd220df4e4c302c40094435c1dc3 100644
(file)
--- 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)
{
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
#else
- struct tty_struct *tty = port->info->tty;
+ struct tty_struct *tty = port->info->
port.
tty;
#endif
unsigned int ch = 0, rsr = 0, fifocnt;
#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)
{
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;
struct circ_buf *xmit = &port->info->xmit;
+#endif
if (uart_tx_stopped(port)) {
amazonasc_stop_tx(port);
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;
}
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;
{
uart_unregister_driver(&amazonasc_reg);
return 0;