Staging: comedi: remove comedi-specific wrappers
[linux-block.git] / drivers / staging / comedi / drivers / pcl724.c
index cd1e784f25f97e80043ab6f8154091219bc998ea..699daff3035ab2a8781a2d9971d861f9d29c73e3 100644 (file)
@@ -54,18 +54,18 @@ See the source for configuration details.
 
 #define SIZE_8255      4
 
-// #define PCL724_IRQ   1  /* no IRQ support now */
+/* #define PCL724_IRQ   1  no IRQ support now */
 
-static int pcl724_attach(struct comedi_device * dev, struct comedi_devconfig * it);
-static int pcl724_detach(struct comedi_device * dev);
+static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it);
+static int pcl724_detach(struct comedi_device *dev);
 
 struct pcl724_board {
 
-       const char *name;       // board name
-       int dio;                // num of DIO
-       int numofports;         // num of 8255 subdevices
-       unsigned int IRQbits;   // allowed interrupts
-       unsigned int io_range;  // len of IO space
+       const char *name;       /*  board name */
+       int dio;                /*  num of DIO */
+       int numofports;         /*  num of 8255 subdevices */
+       unsigned int IRQbits;   /*  allowed interrupts */
+       unsigned int io_range;  /*  len of IO space */
        char can_have96;
        char is_pet48;
 };
@@ -84,13 +84,13 @@ static const struct pcl724_board boardtypes[] = {
 #define this_board ((const struct pcl724_board *)dev->board_ptr)
 
 static struct comedi_driver driver_pcl724 = {
-      driver_name:"pcl724",
-      module:THIS_MODULE,
-      attach:pcl724_attach,
-      detach:pcl724_detach,
-      board_name:&boardtypes[0].name,
-      num_names:n_boardtypes,
-      offset:sizeof(struct pcl724_board),
+       .driver_name = "pcl724",
+       .module = THIS_MODULE,
+       .attach = pcl724_attach,
+       .detach = pcl724_detach,
+       .board_name = &boardtypes[0].name,
+       .num_names = n_boardtypes,
+       .offset = sizeof(struct pcl724_board),
 };
 
 COMEDI_INITCLEANUP(driver_pcl724);
@@ -124,7 +124,7 @@ static int subdev_8255mapped_cb(int dir, int port, int data,
        }
 }
 
-static int pcl724_attach(struct comedi_device * dev, struct comedi_devconfig * it)
+static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
        unsigned long iobase;
        unsigned int iorange;
@@ -137,7 +137,7 @@ static int pcl724_attach(struct comedi_device * dev, struct comedi_devconfig * i
        iorange = this_board->io_range;
        if ((this_board->can_have96) && ((it->options[1] == 1)
                        || (it->options[1] == 96)))
-               iorange = PCL722_96_SIZE;       // PCL-724 in 96 DIO configuration
+               iorange = PCL722_96_SIZE;       /*  PCL-724 in 96 DIO configuration */
        printk("comedi%d: pcl724: board=%s, 0x%03lx ", dev->minor,
                this_board->name, iobase);
        if (!request_region(iobase, iorange, "pcl724")) {
@@ -155,19 +155,18 @@ static int pcl724_attach(struct comedi_device * dev, struct comedi_devconfig * i
                irq = it->options[1];
                if (irq) {      /* we want to use IRQ */
                        if (((1 << irq) & this_board->IRQbits) == 0) {
-                               rt_printk
+                               printk
                                        (", IRQ %u is out of allowed range, DISABLING IT",
                                        irq);
                                irq = 0;        /* Bad IRQ */
                        } else {
-                               if (comedi_request_irq(irq, interrupt_pcl724, 0,
-                                               "pcl724", dev)) {
-                                       rt_printk
+                               if (request_irq(irq, interrupt_pcl724, 0, "pcl724", dev)) {
+                                       printk
                                                (", unable to allocate IRQ %u, DISABLING IT",
                                                irq);
                                        irq = 0;        /* Can't use IRQ */
                                } else {
-                                       rt_printk(", irq=%u", irq);
+                                       printk(", irq=%u", irq);
                                }
                        }
                }
@@ -181,9 +180,10 @@ static int pcl724_attach(struct comedi_device * dev, struct comedi_devconfig * i
        n_subdevices = this_board->numofports;
        if ((this_board->can_have96) && ((it->options[1] == 1)
                        || (it->options[1] == 96)))
-               n_subdevices = 4;       // PCL-724 in 96 DIO configuration
+               n_subdevices = 4;       /*  PCL-724 in 96 DIO configuration */
 
-       if ((ret = alloc_subdevices(dev, n_subdevices)) < 0)
+       ret = alloc_subdevices(dev, n_subdevices);
+       if (ret < 0)
                return ret;
 
        for (i = 0; i < dev->n_subdevices; i++) {
@@ -200,11 +200,11 @@ static int pcl724_attach(struct comedi_device * dev, struct comedi_devconfig * i
        return 0;
 }
 
-static int pcl724_detach(struct comedi_device * dev)
+static int pcl724_detach(struct comedi_device *dev)
 {
        int i;
 
-//      printk("comedi%d: pcl724: remove\n",dev->minor);
+/* printk("comedi%d: pcl724: remove\n",dev->minor); */
 
        for (i = 0; i < dev->n_subdevices; i++) {
                subdev_8255_cleanup(dev, dev->subdevices + i);
@@ -212,7 +212,7 @@ static int pcl724_detach(struct comedi_device * dev)
 
 #ifdef PCL724_IRQ
        if (dev->irq) {
-               comedi_free_irq(dev->irq, dev);
+               free_irq(dev->irq, dev);
        }
 #endif