staging: comedi: amplc_pci224: use dev->write_subdev

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>
This commit is contained in:
H Hartley Sweeten 2013-12-05 13:43:44 -07:00 committed by Greg Kroah-Hartman
parent c82ea5b4a9
commit f127c47d23

View 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;