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

staging: comedi: dt282x: use dev->read_subdev

Use the dev->read_subdev that was setup in the device attach instead
of accessing the dev->subdevices array directly.
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 89d48385
...@@ -339,11 +339,11 @@ static void dt282x_ao_dma_interrupt(struct comedi_device *dev) ...@@ -339,11 +339,11 @@ static void dt282x_ao_dma_interrupt(struct comedi_device *dev)
static void dt282x_ai_dma_interrupt(struct comedi_device *dev) static void dt282x_ai_dma_interrupt(struct comedi_device *dev)
{ {
struct dt282x_private *devpriv = dev->private; struct dt282x_private *devpriv = dev->private;
struct comedi_subdevice *s = dev->read_subdev;
void *ptr; void *ptr;
int size; int size;
int i; int i;
int ret; int ret;
struct comedi_subdevice *s = &dev->subdevices[0];
outw(devpriv->supcsr | DT2821_CLRDMADNE, dev->iobase + DT2821_SUPCSR); outw(devpriv->supcsr | DT2821_CLRDMADNE, dev->iobase + DT2821_SUPCSR);
...@@ -448,7 +448,7 @@ static irqreturn_t dt282x_interrupt(int irq, void *d) ...@@ -448,7 +448,7 @@ static irqreturn_t dt282x_interrupt(int irq, void *d)
{ {
struct comedi_device *dev = d; struct comedi_device *dev = d;
struct dt282x_private *devpriv = dev->private; struct dt282x_private *devpriv = dev->private;
struct comedi_subdevice *s; struct comedi_subdevice *s = dev->read_subdev;
struct comedi_subdevice *s_ao; struct comedi_subdevice *s_ao;
unsigned int supcsr, adcsr, dacsr; unsigned int supcsr, adcsr, dacsr;
int handled = 0; int handled = 0;
...@@ -458,7 +458,6 @@ static irqreturn_t dt282x_interrupt(int irq, void *d) ...@@ -458,7 +458,6 @@ static irqreturn_t dt282x_interrupt(int irq, void *d)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
s = &dev->subdevices[0];
s_ao = &dev->subdevices[1]; s_ao = &dev->subdevices[1];
adcsr = inw(dev->iobase + DT2821_ADCSR); adcsr = inw(dev->iobase + DT2821_ADCSR);
dacsr = inw(dev->iobase + DT2821_DACSR); dacsr = inw(dev->iobase + DT2821_DACSR);
......
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