summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-03-10 21:07:37 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-17 21:04:00 (GMT)
commit3ccdcf3255fde9d9d3ffcd91877bd65304ed4528 (patch)
tree3978576fc4cb6750ca20bde05d77809a999d351a /drivers
parent6c8df38a953391ac22b3931fcef9c22faf888c8b (diff)
downloadlinux-3ccdcf3255fde9d9d3ffcd91877bd65304ed4528.tar.xz
staging: comedi: c6xdigio: tidy up subdevice 1 init
Remove the commented out init of the 'trig'. For aesthetics, add some whitespace to the init and rename the 'insn_read' 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/c6xdigio.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/comedi/drivers/c6xdigio.c b/drivers/staging/comedi/drivers/c6xdigio.c
index 6207bc1..63187c5 100644
--- a/drivers/staging/comedi/drivers/c6xdigio.c
+++ b/drivers/staging/comedi/drivers/c6xdigio.c
@@ -187,9 +187,10 @@ static int c6xdigio_pwm_insn_write(struct comedi_device *dev,
return i;
}
-static int c6xdigio_ei_insn_read(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data)
+static int c6xdigio_encoder_insn_read(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ struct comedi_insn *insn,
+ unsigned int *data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
int n;
@@ -247,13 +248,12 @@ static int c6xdigio_attach(struct comedi_device *dev,
s = &dev->subdevices[1];
/* encoder (counter) subdevice */
- s->type = COMEDI_SUBD_COUNTER;
- s->subdev_flags = SDF_READABLE | SDF_LSAMPL;
- s->n_chan = 2;
- /* s->trig[0] = c6xdigio_ei; */
- s->insn_read = c6xdigio_ei_insn_read;
- s->maxdata = 0xffffff;
- s->range_table = &range_unknown;
+ s->type = COMEDI_SUBD_COUNTER;
+ s->subdev_flags = SDF_READABLE | SDF_LSAMPL;
+ s->n_chan = 2;
+ s->maxdata = 0xffffff;
+ s->range_table = &range_unknown;
+ s->insn_read = c6xdigio_encoder_insn_read;
/* I will call this init anyway but more than likely the DSP board */
/* will not be connected when device driver is loaded. */