staging: comedi: adv_pci1710: tidy up counter subdevice init
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 20 Jan 2015 21:53:11 +0000 (14:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 11:59:11 +0000 (19:59 +0800)
For aesthetics, add some whitespace to the counter subdevice init and
rename the support functions. Also remove the unnecessary comments.

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 ce91cec5bc90a168882f20a53f2928a2b082a365..4b0735ad57065d228e9af53327ebbd036a73aa8e 100644 (file)
@@ -532,10 +532,7 @@ static void pci171x_start_pacer(struct comedi_device *dev,
        }
 }
 
-/*
-==============================================================================
-*/
-static int pci171x_insn_counter_read(struct comedi_device *dev,
+static int pci171x_counter_insn_read(struct comedi_device *dev,
                                     struct comedi_subdevice *s,
                                     struct comedi_insn *insn,
                                     unsigned int *data)
@@ -556,10 +553,7 @@ static int pci171x_insn_counter_read(struct comedi_device *dev,
        return insn->n;
 }
 
-/*
-==============================================================================
-*/
-static int pci171x_insn_counter_write(struct comedi_device *dev,
+static int pci171x_counter_insn_write(struct comedi_device *dev,
                                      struct comedi_subdevice *s,
                                      struct comedi_insn *insn,
                                      unsigned int *data)
@@ -586,10 +580,7 @@ static int pci171x_insn_counter_write(struct comedi_device *dev,
        return insn->n;
 }
 
-/*
-==============================================================================
-*/
-static int pci171x_insn_counter_config(struct comedi_device *dev,
+static int pci171x_counter_insn_config(struct comedi_device *dev,
                                       struct comedi_subdevice *s,
                                       struct comedi_insn *insn,
                                       unsigned int *data)
@@ -1151,14 +1142,14 @@ static int pci1710_auto_attach(struct comedi_device *dev,
 
        if (this_board->has_counter) {
                s = &dev->subdevices[subdev];
-               s->type = COMEDI_SUBD_COUNTER;
-               s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
-               s->n_chan = 1;
-               s->maxdata = 0xffff;
-               s->range_table = &range_unknown;
-               s->insn_read = pci171x_insn_counter_read;
-               s->insn_write = pci171x_insn_counter_write;
-               s->insn_config = pci171x_insn_counter_config;
+               s->type         = COMEDI_SUBD_COUNTER;
+               s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
+               s->n_chan       = 1;
+               s->maxdata      = 0xffff;
+               s->range_table  = &range_unknown;
+               s->insn_read    = pci171x_counter_insn_read;
+               s->insn_write   = pci171x_counter_insn_write;
+               s->insn_config  = pci171x_counter_insn_config;
                subdev++;
        }