staging: comedi: adv_pci1710: rename pci171x_d[io]_insn_bits
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 13 Nov 2015 18:11:15 +0000 (11:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Dec 2015 22:56:30 +0000 (14:56 -0800)
Rename these functions so they have namespace associated with the driver.

For aesthetics, move the functions so they are not located in the middle
of the analog input/output support functions.

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/adv_pci1710.c

index 4a8604f09512d861c93b4a62949bfa98a1bd2f30..45661228ed56dcc5016bbb9999fd31c905139c3e 100644 (file)
@@ -387,29 +387,6 @@ static int pci171x_ao_insn_write(struct comedi_device *dev,
        return insn->n;
 }
 
-static int pci171x_di_insn_bits(struct comedi_device *dev,
-                               struct comedi_subdevice *s,
-                               struct comedi_insn *insn,
-                               unsigned int *data)
-{
-       data[1] = inw(dev->iobase + PCI171X_DI_REG);
-
-       return insn->n;
-}
-
-static int pci171x_do_insn_bits(struct comedi_device *dev,
-                               struct comedi_subdevice *s,
-                               struct comedi_insn *insn,
-                               unsigned int *data)
-{
-       if (comedi_dio_update_state(s, data))
-               outw(s->state, dev->iobase + PCI171X_DO_REG);
-
-       data[1] = s->state;
-
-       return insn->n;
-}
-
 static int pci171x_ai_cancel(struct comedi_device *dev,
                             struct comedi_subdevice *s)
 {
@@ -668,6 +645,29 @@ static int pci171x_ai_cmdtest(struct comedi_device *dev,
        return 0;
 }
 
+static int pci1710_di_insn_bits(struct comedi_device *dev,
+                               struct comedi_subdevice *s,
+                               struct comedi_insn *insn,
+                               unsigned int *data)
+{
+       data[1] = inw(dev->iobase + PCI171X_DI_REG);
+
+       return insn->n;
+}
+
+static int pci1710_do_insn_bits(struct comedi_device *dev,
+                               struct comedi_subdevice *s,
+                               struct comedi_insn *insn,
+                               unsigned int *data)
+{
+       if (comedi_dio_update_state(s, data))
+               outw(s->state, dev->iobase + PCI171X_DO_REG);
+
+       data[1] = s->state;
+
+       return insn->n;
+}
+
 static int pci1710_counter_insn_config(struct comedi_device *dev,
                                       struct comedi_subdevice *s,
                                       struct comedi_insn *insn,
@@ -840,7 +840,7 @@ static int pci1710_auto_attach(struct comedi_device *dev,
                s->n_chan       = 16;
                s->maxdata      = 1;
                s->range_table  = &range_digital;
-               s->insn_bits    = pci171x_di_insn_bits;
+               s->insn_bits    = pci1710_di_insn_bits;
                subdev++;
 
                /* Digital Output subdevice */
@@ -850,7 +850,7 @@ static int pci1710_auto_attach(struct comedi_device *dev,
                s->n_chan       = 16;
                s->maxdata      = 1;
                s->range_table  = &range_digital;
-               s->insn_bits    = pci171x_do_insn_bits;
+               s->insn_bits    = pci1710_do_insn_bits;
                subdev++;
 
                /* Counter subdevice (8254) */