staging: comedi: amplc_pci224: use dev->write_subdev
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 5 Dec 2013 20:43:44 +0000 (13:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Dec 2013 21:07:17 +0000 (13:07 -0800)
Use the dev->write_subdev that was setup in the device attach instead
of accessing the dev->subdevices array directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/amplc_pci224.c

index 230a0103497b86771b6d6793bd9c89c7264bcca6..f16b4724632cbaa5a500bbb7a2cce25d644cc52e 100644 (file)
@@ -1140,7 +1140,7 @@ static irqreturn_t pci224_interrupt(int irq, void *d)
 {
        struct comedi_device *dev = d;
        struct pci224_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[0];
+       struct comedi_subdevice *s = dev->write_subdev;
        struct comedi_cmd *cmd;
        unsigned char intstat, valid_intstat;
        unsigned char curenab;