staging: comedi: ii_pci20kc: remove forward declarations 3
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 24 Jul 2013 19:10:18 +0000 (12:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 20:24:12 +0000 (13:24 -0700)
Move a couple functions to remove the need for the last forward
declarations.

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

index eab48e31fb82854093c07ac6f2edcde50040ee34..ad4dc5741b27ca6bbd50a34ecb5dac44856a612d 100644 (file)
@@ -156,44 +156,12 @@ struct pci20xxx_private {
 
 /* pci20006m */
 
-static int pci20006_insn_read(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data);
-static int pci20006_insn_write(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data);
-
 static const struct comedi_lrange *pci20006_range_list[] = {
        &range_bipolar10,
        &range_unipolar10,
        &range_bipolar5,
 };
 
-static int pci20006_init(struct comedi_device *dev, struct comedi_subdevice *s,
-                        int opt0, int opt1)
-{
-       union pci20xxx_subdev_private *sdp = s->private;
-
-       if (opt0 < 0 || opt0 > 2)
-               opt0 = 0;
-       if (opt1 < 0 || opt1 > 2)
-               opt1 = 0;
-
-       sdp->pci20006.ao_range_list[0] = pci20006_range_list[opt0];
-       sdp->pci20006.ao_range_list[1] = pci20006_range_list[opt1];
-
-       /* ao subdevice */
-       s->type = COMEDI_SUBD_AO;
-       s->subdev_flags = SDF_WRITABLE;
-       s->n_chan = 2;
-       s->len_chanlist = 2;
-       s->insn_read = pci20006_insn_read;
-       s->insn_write = pci20006_insn_write;
-       s->maxdata = 0xffff;
-       s->range_table_list = sdp->pci20006.ao_range_list;
-       return 0;
-}
-
 static int pci20006_insn_read(struct comedi_device *dev,
                              struct comedi_subdevice *s,
                              struct comedi_insn *insn, unsigned int *data)
@@ -238,11 +206,32 @@ static int pci20006_insn_write(struct comedi_device *dev,
        return 1;
 }
 
-/* PCI20341M */
+static int pci20006_init(struct comedi_device *dev, struct comedi_subdevice *s,
+                        int opt0, int opt1)
+{
+       union pci20xxx_subdev_private *sdp = s->private;
 
-static int pci20341_insn_read(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data);
+       if (opt0 < 0 || opt0 > 2)
+               opt0 = 0;
+       if (opt1 < 0 || opt1 > 2)
+               opt1 = 0;
+
+       sdp->pci20006.ao_range_list[0] = pci20006_range_list[opt0];
+       sdp->pci20006.ao_range_list[1] = pci20006_range_list[opt1];
+
+       /* ao subdevice */
+       s->type = COMEDI_SUBD_AO;
+       s->subdev_flags = SDF_WRITABLE;
+       s->n_chan = 2;
+       s->len_chanlist = 2;
+       s->insn_read = pci20006_insn_read;
+       s->insn_write = pci20006_insn_write;
+       s->maxdata = 0xffff;
+       s->range_table_list = sdp->pci20006.ao_range_list;
+       return 0;
+}
+
+/* PCI20341M */
 
 static const int pci20341_timebase[] = { 0x00, 0x00, 0x00, 0x04 };
 static const int pci20341_settling_time[] = { 0x58, 0x58, 0x93, 0x99 };
@@ -269,43 +258,6 @@ static const struct comedi_lrange *const pci20341_ranges[] = {
        &range_bipolar0_025,
 };
 
-static int pci20341_init(struct comedi_device *dev, struct comedi_subdevice *s,
-                        int opt0, int opt1)
-{
-       union pci20xxx_subdev_private *sdp = s->private;
-       int option;
-
-       /* options handling */
-       if (opt0 < 0 || opt0 > 3)
-               opt0 = 0;
-       sdp->pci20341.timebase = pci20341_timebase[opt0];
-       sdp->pci20341.settling_time = pci20341_settling_time[opt0];
-
-       /* ai subdevice */
-       s->type = COMEDI_SUBD_AI;
-       s->subdev_flags = SDF_READABLE;
-       s->n_chan = PCI20341_CHAN_NR;
-       s->len_chanlist = PCI20341_SCANLIST;
-       s->insn_read = pci20341_insn_read;
-       s->maxdata = 0xffff;
-       s->range_table = pci20341_ranges[opt0];
-
-       /* depends on gain, trigger, repetition mode */
-       option = sdp->pci20341.timebase | PCI20341_REPMODE;
-
-       /* initialize Module */
-       writeb(PCI20341_INIT, sdp->iobase + PCI20341_CONFIG_REG);
-       /* set Pacer */
-       writeb(PCI20341_PACER, sdp->iobase + PCI20341_MOD_STATUS);
-       /* option register */
-       writeb(option, sdp->iobase + PCI20341_OPT_REG);
-       /* settling time counter */
-       writeb(sdp->pci20341.settling_time,
-               sdp->iobase + PCI20341_SET_TIME_REG);
-       /* trigger not implemented */
-       return 0;
-}
-
 static int pci20341_insn_read(struct comedi_device *dev,
                              struct comedi_subdevice *s,
                              struct comedi_insn *insn, unsigned int *data)
@@ -361,6 +313,43 @@ static int pci20341_insn_read(struct comedi_device *dev,
        return i;
 }
 
+static int pci20341_init(struct comedi_device *dev, struct comedi_subdevice *s,
+                        int opt0, int opt1)
+{
+       union pci20xxx_subdev_private *sdp = s->private;
+       int option;
+
+       /* options handling */
+       if (opt0 < 0 || opt0 > 3)
+               opt0 = 0;
+       sdp->pci20341.timebase = pci20341_timebase[opt0];
+       sdp->pci20341.settling_time = pci20341_settling_time[opt0];
+
+       /* ai subdevice */
+       s->type = COMEDI_SUBD_AI;
+       s->subdev_flags = SDF_READABLE;
+       s->n_chan = PCI20341_CHAN_NR;
+       s->len_chanlist = PCI20341_SCANLIST;
+       s->insn_read = pci20341_insn_read;
+       s->maxdata = 0xffff;
+       s->range_table = pci20341_ranges[opt0];
+
+       /* depends on gain, trigger, repetition mode */
+       option = sdp->pci20341.timebase | PCI20341_REPMODE;
+
+       /* initialize Module */
+       writeb(PCI20341_INIT, sdp->iobase + PCI20341_CONFIG_REG);
+       /* set Pacer */
+       writeb(PCI20341_PACER, sdp->iobase + PCI20341_MOD_STATUS);
+       /* option register */
+       writeb(option, sdp->iobase + PCI20341_OPT_REG);
+       /* settling time counter */
+       writeb(sdp->pci20341.settling_time,
+               sdp->iobase + PCI20341_SET_TIME_REG);
+       /* trigger not implemented */
+       return 0;
+}
+
 #if 0
 static void pci20xxx_do(struct comedi_device *dev, struct comedi_subdevice *s)
 {
This page took 0.028568 seconds and 5 git commands to generate.