Re: Agere modem patch for 2.6.32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



forgot the patch, sorry ;)

-- 
Nick Zhuravlev
www.auriga.com

On Sat, Dec 26, 2009 at 02:25:15AM +0300, Nikolay Zhuravlev <xxor@xxxxxxx> wrote:

> All,
> 
> Attached is the patch for the 2.6.30.tar.bz2 drivers
> to make them work on the 2.6.32 kernels.
diff -Naur agrsm-2.6.30/serial26.c agrsm-2.6.30-for2.6.32/serial26.c
--- agrsm-2.6.30/serial26.c	2009-12-06 22:03:49.000000000 +0300
+++ agrsm-2.6.30-for2.6.32/serial26.c	2009-12-26 01:46:58.000000000 +0300
@@ -67,6 +67,7 @@
 static char *serialif_version = "2.1.80.0";
 static char *serialif_revdate = "2007-10-01";
 static char *serialif_name = "Agere Modem Interface driver";
+#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/tty.h>
 #include <linux/ioport.h>
@@ -784,7 +785,11 @@
 	static _INLINE_ void
 receive_chars(struct uart_8250_port *up, int *status, struct pt_regs *regs)
 {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 32)
+	struct tty_struct *tty = up->port.state->port.tty;
+#else
 	struct tty_struct *tty = up->port.info->port.tty;
+#endif
 	unsigned char ch, lsr = *status;
 	int max_count = 256;
 	char flag;
@@ -859,7 +864,11 @@
 
 static _INLINE_ void transmit_chars(struct uart_8250_port *up)
 {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 32)
+	struct circ_buf *xmit = &up->port.state->xmit;
+#else
 	struct circ_buf *xmit = &up->port.info->xmit;
+#endif
 	int count;
 
 	
@@ -896,7 +905,6 @@
 {
 	int status;
 
-	
 	status = serial_in(up, UART_MSR);
 
 	if ((status & UART_MSR_ANY_DELTA) == 0)
@@ -911,7 +919,11 @@
 	if (status & UART_MSR_DCTS)
 		uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 32)
+	wake_up_interruptible(&up->port.state->port.delta_msr_wait);
+#else
 	wake_up_interruptible(&up->port.info->delta_msr_wait);
+#endif
 }
 
 /*

[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux