Commit 6b680f90 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: amplc_dio200: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Use a local variable for the subdevice pointer to keep the line
< 80 chars.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 40c4db8b
...@@ -978,15 +978,15 @@ static irqreturn_t dio200_interrupt(int irq, void *d) ...@@ -978,15 +978,15 @@ static irqreturn_t dio200_interrupt(int irq, void *d)
{ {
struct comedi_device *dev = d; struct comedi_device *dev = d;
struct dio200_private *devpriv = dev->private; struct dio200_private *devpriv = dev->private;
struct comedi_subdevice *s;
int handled; int handled;
if (!dev->attached) if (!dev->attached)
return IRQ_NONE; return IRQ_NONE;
if (devpriv->intr_sd >= 0) { if (devpriv->intr_sd >= 0) {
handled = dio200_handle_read_intr(dev, s = &dev->subdevices[devpriv->intr_sd];
dev->subdevices + handled = dio200_handle_read_intr(dev, s);
devpriv->intr_sd);
} else { } else {
handled = 0; handled = 0;
} }
......
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