Commit 92a3b54b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: das1800: tidy up digital input subdevice init

For aesthetics, add some whitespace to the subdevice init and rename
the (*insn_bits) function.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5934ff9e
...@@ -1130,10 +1130,10 @@ static int das1800_ao_winsn(struct comedi_device *dev, ...@@ -1130,10 +1130,10 @@ static int das1800_ao_winsn(struct comedi_device *dev,
return 1; return 1;
} }
/* reads from digital input channels */ static int das1800_di_insn_bits(struct comedi_device *dev,
static int das1800_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_subdevice *s, struct comedi_insn *insn,
struct comedi_insn *insn, unsigned int *data) unsigned int *data)
{ {
data[1] = inb(dev->iobase + DAS1800_DIGITAL) & 0xf; data[1] = inb(dev->iobase + DAS1800_DIGITAL) & 0xf;
data[0] = 0; data[0] = 0;
...@@ -1387,14 +1387,14 @@ static int das1800_attach(struct comedi_device *dev, ...@@ -1387,14 +1387,14 @@ static int das1800_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_UNUSED; s->type = COMEDI_SUBD_UNUSED;
} }
/* di */ /* Digital Input subdevice */
s = &dev->subdevices[2]; s = &dev->subdevices[2];
s->type = COMEDI_SUBD_DI; s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE; s->subdev_flags = SDF_READABLE;
s->n_chan = 4; s->n_chan = 4;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = das1800_di_rbits; s->insn_bits = das1800_di_insn_bits;
/* Digital Output subdevice */ /* Digital Output subdevice */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment