Commit 9f1a0909 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: comedi_parport: remove 'a_data' from private data

Use the subdevice s->state to hold the current state of the data register
outputs instead of carrying it in the private data.
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 5790b427
......@@ -92,7 +92,6 @@ pin, which can be used to wake up tasks.
#define PARPORT_CTRL_BIDIR_ENA (1 << 5)
struct parport_private {
unsigned int a_data;
unsigned int c_data;
int enable_irq;
};
......@@ -100,13 +99,11 @@ struct parport_private {
static int parport_insn_a(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{
struct parport_private *devpriv = dev->private;
if (data[0]) {
devpriv->a_data &= ~data[0];
devpriv->a_data |= (data[0] & data[1]);
s->state &= ~data[0];
s->state |= (data[0] & data[1]);
outb(devpriv->a_data, dev->iobase + PARPORT_DATA_REG);
outb(s->state, dev->iobase + PARPORT_DATA_REG);
}
data[1] = inb(dev->iobase + PARPORT_DATA_REG);
......@@ -327,8 +324,7 @@ static int parport_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_UNUSED;
}
devpriv->a_data = 0;
outb(devpriv->a_data, dev->iobase + PARPORT_DATA_REG);
outb(0, dev->iobase + PARPORT_DATA_REG);
devpriv->c_data = 0;
outb(devpriv->c_data, dev->iobase + PARPORT_CTRL_REG);
......
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