From: H Hartley Sweeten Date: Thu, 6 Sep 2012 01:29:25 +0000 (-0700) Subject: staging: comedi: amplc_dio200: remove subdevice pointer math X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6b680f90c3300505a62e456b3c0e56de358f5d9a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/amplc_dio200.c b/drivers/staging/comedi/drivers/amplc_dio200.c index 585889282b25..b7cfc13a951f 100644 --- a/drivers/staging/comedi/drivers/amplc_dio200.c +++ b/drivers/staging/comedi/drivers/amplc_dio200.c @@ -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; }