Skip to content

Commit

Permalink
staging: comedi: amplc_dio200: remove subdevice pointer math
Browse files Browse the repository at this point in the history
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: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 40c4db8 commit 6b680f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/comedi/drivers/amplc_dio200.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,15 +978,15 @@ static irqreturn_t dio200_interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
struct dio200_private *devpriv = dev->private;
struct comedi_subdevice *s;
int handled;

if (!dev->attached)
return IRQ_NONE;

if (devpriv->intr_sd >= 0) {
handled = dio200_handle_read_intr(dev,
dev->subdevices +
devpriv->intr_sd);
s = &dev->subdevices[devpriv->intr_sd];
handled = dio200_handle_read_intr(dev, s);
} else {
handled = 0;
}
Expand Down

0 comments on commit 6b680f9

Please sign in to comment.