Staging: comedi: jr3_pci.c: add required includes
[safe/jmp/linux-2.6] / drivers / staging / comedi / drivers / dt2814.c
index 6b82f6e..5906ddd 100644 (file)
@@ -39,6 +39,7 @@ a power of 10, from 1 to 10^7, of which only 3 or 4 are useful.  In
 addition, the clock does not seem to be very accurate.
 */
 
+#include <linux/interrupt.h>
 #include "../comedidev.h"
 
 #include <linux/ioport.h>
@@ -62,10 +63,10 @@ addition, the clock does not seem to be very accurate.
 static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it);
 static int dt2814_detach(struct comedi_device *dev);
 static struct comedi_driver driver_dt2814 = {
-      driver_name:"dt2814",
-      module:THIS_MODULE,
-      attach:dt2814_attach,
-      detach:dt2814_detach,
+       .driver_name = "dt2814",
+       .module = THIS_MODULE,
+       .attach = dt2814_attach,
+       .detach = dt2814_detach,
 };
 
 COMEDI_INITCLEANUP(driver_dt2814);
@@ -97,7 +98,7 @@ static int dt2814_ai_insn_read(struct comedi_device *dev, struct comedi_subdevic
                for (i = 0; i < DT2814_TIMEOUT; i++) {
                        status = inb(dev->iobase + DT2814_CSR);
                        printk("dt2814: status: %02x\n", status);
-                       comedi_udelay(10);
+                       udelay(10);
                        if (status & DT2814_FINISH)
                                break;
                }
@@ -262,7 +263,7 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        dev->board_name = "dt2814";
 
        outb(0, dev->iobase + DT2814_CSR);
-       comedi_udelay(100);
+       udelay(100);
        if (inb(dev->iobase + DT2814_CSR) & DT2814_ERR) {
                printk("reset error (fatal)\n");
                return -EIO;
@@ -279,7 +280,7 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
                outb(0, dev->iobase + DT2814_CSR);
 
-               comedi_udelay(100);
+               udelay(100);
 
                irq = probe_irq_off(irqs);
                restore_flags(flags);
@@ -293,7 +294,7 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 #endif
        dev->irq = 0;
        if (irq > 0) {
-               if (comedi_request_irq(irq, dt2814_interrupt, 0, "dt2814", dev)) {
+               if (request_irq(irq, dt2814_interrupt, 0, "dt2814", dev)) {
                        printk("(irq %d unavailable)\n", irq);
                } else {
                        printk("( irq = %d )\n", irq);
@@ -309,9 +310,12 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 #endif
        }
 
-       if ((ret = alloc_subdevices(dev, 1)) < 0)
+       ret = alloc_subdevices(dev, 1);
+       if (ret < 0)
                return ret;
-       if ((ret = alloc_private(dev, sizeof(struct dt2814_private))) < 0)
+
+       ret = alloc_private(dev, sizeof(struct dt2814_private));
+       if (ret < 0)
                return ret;
 
        s = dev->subdevices + 0;
@@ -334,7 +338,7 @@ static int dt2814_detach(struct comedi_device *dev)
        printk("comedi%d: dt2814: remove\n", dev->minor);
 
        if (dev->irq) {
-               comedi_free_irq(dev->irq, dev);
+               free_irq(dev->irq, dev);
        }
        if (dev->iobase) {
                release_region(dev->iobase, DT2814_SIZE);