From: H Hartley Sweeten Date: Thu, 5 Dec 2013 20:43:46 +0000 (-0700) Subject: staging: comedi: ni_atmio16d: use dev->read_subdev X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bea70d0b2dc078c7eab3049c44aade037ffbcb90;p=linux-beck.git staging: comedi: ni_atmio16d: 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_atmio16d.c b/drivers/staging/comedi/drivers/ni_atmio16d.c index 834c9e1e6058..3a92fe52b9ac 100644 --- a/drivers/staging/comedi/drivers/ni_atmio16d.c +++ b/drivers/staging/comedi/drivers/ni_atmio16d.c @@ -229,7 +229,7 @@ static void reset_atmio16d(struct comedi_device *dev) static irqreturn_t atmio16d_interrupt(int irq, void *d) { struct comedi_device *dev = d; - struct comedi_subdevice *s = &dev->subdevices[0]; + struct comedi_subdevice *s = dev->read_subdev; comedi_buf_put(s->async, inw(dev->iobase + AD_FIFO_REG));