patch-1.3.72 linux/drivers/char/serial.c

Next file: linux/drivers/net/CONFIG
Previous file: linux/drivers/char/mem.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.71/linux/drivers/char/serial.c linux/drivers/char/serial.c
@@ -76,6 +76,8 @@
 #define RS_STROBE_TIME (10*HZ)
 #define RS_ISR_PASS_LIMIT 256
 
+#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
+
 #define _INLINE_ inline
   
 /*
@@ -962,7 +964,8 @@
 		} else 
 			handler = rs_interrupt_single;
 
-		retval = request_irq(info->irq, handler, SA_INTERRUPT, "serial", NULL);
+		retval = request_irq(info->irq, handler, IRQ_T(info),
+				     "serial", NULL);
 		if (retval) {
 			restore_flags(flags);
 			if (suser()) {
@@ -1090,7 +1093,8 @@
 			  !IRQ_ports[info->irq]->next_port)) {
 		if (IRQ_ports[info->irq]) {
 			free_irq(info->irq, NULL);
-			retval = request_irq(info->irq, rs_interrupt_single, SA_INTERRUPT, "serial", NULL);
+			retval = request_irq(info->irq, rs_interrupt_single,
+					     IRQ_T(info), "serial", NULL);
 			
 			if (retval)
 				printk("serial shutdown: request_irq: error %d"
@@ -1852,7 +1856,7 @@
 		else
 			handler = rs_interrupt;
 
-		retval = request_irq(info->irq, handler, SA_INTERRUPT,
+		retval = request_irq(info->irq, handler, IRQ_T(info),
 				     "serial", NULL);
 		if (retval) {
 			printk("Couldn't reallocate serial interrupt "
@@ -2823,6 +2827,7 @@
 	}
 	info->irq = req->irq;
 	info->port = req->port;
+	info->flags = req->flags;
 	autoconfig(info);
 	if (info->type == PORT_UNKNOWN) {
 		restore_flags(flags);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this