]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: comedi_parport: tidy up parport_insn_b()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 30 Aug 2013 18:45:53 +0000 (11:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2013 14:47:42 +0000 (07:47 -0700)
Rename this function to better describe it's use.

Tidy it up to follow the normal comedi (*insn_bits) for DI subdevices.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/comedi_parport.c

index 0e0cc75d03e7685567cd60f0279953f6ea06bc75..8394b7ea894a262985e0012f2d6b6ac7b55ee90b 100644 (file)
@@ -130,15 +130,12 @@ static int parport_data_reg_insn_config(struct comedi_device *dev,
        return insn->n;
 }
 
-static int parport_insn_b(struct comedi_device *dev, struct comedi_subdevice *s,
-                         struct comedi_insn *insn, unsigned int *data)
+static int parport_status_reg_insn_bits(struct comedi_device *dev,
+                                       struct comedi_subdevice *s,
+                                       struct comedi_insn *insn,
+                                       unsigned int *data)
 {
-       if (data[0]) {
-               /* should writes be ignored? */
-               /* anyone??? */
-       }
-
-       data[1] = (inb(dev->iobase + PARPORT_STATUS_REG) >> 3);
+       data[1] = inb(dev->iobase + PARPORT_STATUS_REG) >> 3;
 
        return insn->n;
 }
@@ -299,7 +296,7 @@ static int parport_attach(struct comedi_device *dev,
        s->n_chan = 5;
        s->maxdata = 1;
        s->range_table = &range_digital;
-       s->insn_bits = parport_insn_b;
+       s->insn_bits = parport_status_reg_insn_bits;
 
        s = &dev->subdevices[2];
        s->type = COMEDI_SUBD_DO;