Commit 6e2dbe3c authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: comedi_parport: tidy up parport_insn_b()

Rename this function to better describe it's use.

Tidy it up to follow the normal comedi (*insn_bits) for DI subdevices.
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 9f2843d1
...@@ -130,15 +130,12 @@ static int parport_data_reg_insn_config(struct comedi_device *dev, ...@@ -130,15 +130,12 @@ static int parport_data_reg_insn_config(struct comedi_device *dev,
return insn->n; return insn->n;
} }
static int parport_insn_b(struct comedi_device *dev, struct comedi_subdevice *s, static int parport_status_reg_insn_bits(struct comedi_device *dev,
struct comedi_insn *insn, unsigned int *data) struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ {
if (data[0]) { data[1] = inb(dev->iobase + PARPORT_STATUS_REG) >> 3;
/* should writes be ignored? */
/* anyone??? */
}
data[1] = (inb(dev->iobase + PARPORT_STATUS_REG) >> 3);
return insn->n; return insn->n;
} }
...@@ -299,7 +296,7 @@ static int parport_attach(struct comedi_device *dev, ...@@ -299,7 +296,7 @@ static int parport_attach(struct comedi_device *dev,
s->n_chan = 5; s->n_chan = 5;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = parport_insn_b; s->insn_bits = parport_status_reg_insn_bits;
s = &dev->subdevices[2]; s = &dev->subdevices[2];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
......
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