]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: das1800: tidy up analog output subdevice init
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 8 Apr 2016 19:41:32 +0000 (12:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 05:16:10 +0000 (22:16 -0700)
For aesthetics, add some whitespace to the subdevice init and rename
the (*insn_write) function.

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

index 93a9d1f9a12010f51c77752f7d713886c82c29e5..7f7b1d02c1999d597ca723fcdd887e389f41d99f 100644 (file)
@@ -1098,10 +1098,10 @@ exit:
        return n;
 }
 
-/* writes to an analog output channel */
-static int das1800_ao_winsn(struct comedi_device *dev,
-                           struct comedi_subdevice *s,
-                           struct comedi_insn *insn, unsigned int *data)
+static int das1800_ao_insn_write(struct comedi_device *dev,
+                                struct comedi_subdevice *s,
+                                struct comedi_insn *insn,
+                                unsigned int *data)
 {
        const struct das1800_board *board = dev->board_ptr;
        struct das1800_private *devpriv = dev->private;
@@ -1374,17 +1374,17 @@ static int das1800_attach(struct comedi_device *dev,
                s->munge = das1800_ai_munge;
        }
 
-       /* analog out */
+       /* Analog Output subdevice */
        s = &dev->subdevices[1];
        if (board->ao_ability == 1) {
-               s->type = COMEDI_SUBD_AO;
-               s->subdev_flags = SDF_WRITABLE;
-               s->n_chan = board->ao_n_chan;
-               s->maxdata = (1 << board->resolution) - 1;
-               s->range_table = &range_bipolar10;
-               s->insn_write = das1800_ao_winsn;
+               s->type         = COMEDI_SUBD_AO;
+               s->subdev_flags = SDF_WRITABLE;
+               s->n_chan       = board->ao_n_chan;
+               s->maxdata      = (1 << board->resolution) - 1;
+               s->range_table  = &range_bipolar10;
+               s->insn_write   = das1800_ao_insn_write;
        } else {
-               s->type = COMEDI_SUBD_UNUSED;
+               s->type         = COMEDI_SUBD_UNUSED;
        }
 
        /* Digital Input subdevice */