diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2015-10-13 02:07:07 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-13 20:26:19 +0300 |
| commit | 090b82a3a7bfc192d01ff8910485757db65b858f (patch) | |
| tree | 80e98e6cfd317be90892f3c3250e3cb35f308ba1 | |
| parent | 1dbe3884bbd041a4a9657df0de9d558e8335a3b6 (diff) | |
| download | linux-090b82a3a7bfc192d01ff8910485757db65b858f.tar.xz | |
staging: comedi: cb_das16_cs: tidy up analog input subdevice init
This driver currently code not support async commands. Remove the
SDF_CMD_READ subdev_flag and len_chanlist initialization from the
subdevice init.
For aesthetics, 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>
| -rw-r--r-- | drivers/staging/comedi/drivers/cb_das16_cs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index 6f345089a5ee..b3128efb2a0a 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c @@ -143,9 +143,10 @@ static int das16cs_ai_eoc(struct comedi_device *dev, return -EBUSY; } -static int das16cs_ai_rinsn(struct comedi_device *dev, - struct comedi_subdevice *s, - struct comedi_insn *insn, unsigned int *data) +static int das16cs_ai_insn_read(struct comedi_device *dev, + struct comedi_subdevice *s, + struct comedi_insn *insn, + unsigned int *data) { struct das16cs_private *devpriv = dev->private; int chan = CR_CHAN(insn->chanspec); @@ -343,15 +344,14 @@ static int das16cs_auto_attach(struct comedi_device *dev, if (ret) return ret; + /* Analog Input subdevice */ s = &dev->subdevices[0]; - /* analog input subdevice */ s->type = COMEDI_SUBD_AI; - s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF | SDF_CMD_READ; + s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF; s->n_chan = 16; s->maxdata = 0xffff; s->range_table = &das16cs_ai_range; - s->len_chanlist = 16; - s->insn_read = das16cs_ai_rinsn; + s->insn_read = das16cs_ai_insn_read; s = &dev->subdevices[1]; /* analog output subdevice */ |
