]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/sx.c
[PATCH] CONFIG_TELCLOCK depends on X86
[linux-2.6-omap-h63xx.git] / drivers / char / sx.c
index 3b4747230270a3dc38fbdcc12fab013ee5a23439..5fec626598cd26b117a4518761ea40abc19be053 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>
@@ -410,7 +408,7 @@ static struct real_driver sx_real_driver = {
  *
  */
 
-static struct file_operations sx_fw_fops = {
+static const struct file_operations sx_fw_fops = {
        .owner          = THIS_MODULE,
        .ioctl          = sx_fw_ioctl,
 };
@@ -1194,7 +1192,7 @@ static inline void sx_check_modem_signals (struct sx_port *port)
  * Small, elegant, clear.
  */
 
-static irqreturn_t sx_interrupt (int irq, void *ptr, struct pt_regs *regs)
+static irqreturn_t sx_interrupt (int irq, void *ptr)
 {
        struct sx_board *board = ptr;
        struct sx_port *port;
@@ -1302,7 +1300,7 @@ static void sx_pollfunc (unsigned long data)
 
        func_enter ();
 
-       sx_interrupt (0, board, NULL);
+       sx_interrupt (0, board);
 
        init_timer(&board->timer);
 
@@ -1993,7 +1991,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, SA_SHIRQ | SA_INTERRUPT, "sx", board)) {
+                               if(request_irq(board->irq, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board)) {
                                        printk(KERN_ERR "sx: Cannot allocate irq %d.\n", board->irq);
                                        board->irq = 0;
                                }
@@ -2005,7 +2003,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, SA_SHIRQ | SA_INTERRUPT, "sx", board))
+                                       if(! request_irq(irqnr, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board))
                                                break;
                        if(! irqnr)
                                printk(KERN_ERR "sx: Cannot allocate IRQ.\n");
@@ -2226,7 +2224,7 @@ static int probe_si (struct sx_board *board)
        return 1;
 }
 
-static struct tty_operations sx_ops = {
+static const struct tty_operations sx_ops = {
        .break_ctl = sx_break,
        .open   = sx_open,
        .close = gs_close,
@@ -2320,7 +2318,7 @@ static int sx_init_portstructs (int nboards, int nports)
 #ifdef NEW_WRITE_LOCKING
                        port->gs.port_write_mutex = MUTEX;
 #endif
-                       port->gs.driver_lock = SPIN_LOCK_UNLOCKED;
+                       spin_lock_init(&port->gs.driver_lock);
                        /*
                         * Initializing wait queue
                         */