]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Cyclades ISA serial driver fix
authorAndrew Morton <akpm@osdl.org>
Sun, 31 Aug 2003 11:33:41 +0000 (04:33 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 31 Aug 2003 11:33:41 +0000 (04:33 -0700)
From: "John Stoffel" <stoffel@lucent.com>

Quick patch to get my 8 port Cyclades Cyclom-Y ISA card to work.

(It doesn't look to be very SMP-robust, but then the 2.4 dirver probably
isn't either).

drivers/char/cyclades.c

index f0f0693da6255cd6362014e1a5f3f971be099999..74ba43ec4206c0c5652b48dc026fa52ad79c6cf1 100644 (file)
@@ -1050,14 +1050,14 @@ detect_isa_irq (volatile ucchar *address)
     udelay(5000L);
 
     /* Enable the Tx interrupts on the CD1400 */
-    save_flags(flags); cli();
+    local_irq_save(flags);
        cy_writeb((u_long)address + (CyCAR<<index), 0);
        cyy_issue_cmd(address, CyCHAN_CTL|CyENB_XMTR, index);
 
        cy_writeb((u_long)address + (CyCAR<<index), 0);
        cy_writeb((u_long)address + (CySRER<<index), 
                cy_readb(address + (CySRER<<index)) | CyTxRdy);
-    restore_flags(flags);
+    local_irq_restore(flags);
 
     /* Wait ... */
     udelay(5000L);
@@ -5665,7 +5665,7 @@ void
 cy_cleanup_module(void)
 {
     int i;
-    int e1;
+    int e1, e2;
     unsigned long flags;
 
 #ifndef CONFIG_CYZ_INTR
@@ -5675,13 +5675,10 @@ cy_cleanup_module(void)
     }
 #endif /* CONFIG_CYZ_INTR */
 
-    save_flags(flags); cli();
-
     if ((e1 = tty_unregister_driver(cy_serial_driver)))
             printk("cyc: failed to unregister Cyclades serial driver(%d)\n",
                e1);
 
-    restore_flags(flags);
     put_tty_driver(cy_serial_driver);
 
     for (i = 0; i < NR_CARDS; i++) {