linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / char / sx.c
index 8cc1487..a6b4f02 100644 (file)
 #define RCS_ID "$Id: sx.c,v 1.33 2000/03/08 10:01:02 wolff, pvdl Exp $"
 #define RCS_REV "$Revision: 1.33 $"
 
+
 #include <linux/module.h>
+#include <linux/config.h> 
 #include <linux/kdev_t.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -408,7 +410,7 @@ static struct real_driver sx_real_driver = {
  *
  */
 
-static const struct file_operations sx_fw_fops = {
+static struct file_operations sx_fw_fops = {
        .owner          = THIS_MODULE,
        .ioctl          = sx_fw_ioctl,
 };
@@ -1991,7 +1993,7 @@ static int sx_init_board (struct sx_board *board)
                if(board->irq > 0) {
                        /* fixed irq, probably PCI */
                        if(sx_irqmask & (1 << board->irq)) { /* may we use this irq? */
-                               if(request_irq(board->irq, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board)) {
+                               if(request_irq(board->irq, sx_interrupt, SA_SHIRQ | SA_INTERRUPT, "sx", board)) {
                                        printk(KERN_ERR "sx: Cannot allocate irq %d.\n", board->irq);
                                        board->irq = 0;
                                }
@@ -2003,7 +2005,7 @@ static int sx_init_board (struct sx_board *board)
                        int irqmask = sx_irqmask & (IS_SX_BOARD(board) ? SX_ISA_IRQ_MASK : SI2_ISA_IRQ_MASK);
                        for(irqnr = 15; irqnr > 0; irqnr--)
                                if(irqmask & (1 << irqnr))
-                                       if(! request_irq(irqnr, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board))
+                                       if(! request_irq(irqnr, sx_interrupt, SA_SHIRQ | SA_INTERRUPT, "sx", board))
                                                break;
                        if(! irqnr)
                                printk(KERN_ERR "sx: Cannot allocate IRQ.\n");
@@ -2316,9 +2318,9 @@ static int sx_init_portstructs (int nboards, int nports)
                        port->board = board;
                        port->gs.rd = &sx_real_driver;
 #ifdef NEW_WRITE_LOCKING
-                       port->gs.port_write_mutex = MUTEX;
+                       port->gs.port_write_sem = MUTEX;
 #endif
-                       spin_lock_init(&port->gs.driver_lock);
+                       port->gs.driver_lock = SPIN_LOCK_UNLOCKED;
                        /*
                         * Initializing wait queue
                         */