summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-09-05 18:52:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-05 20:06:30 -0700
commit9417de06e02b8d968d52e7d59e7f751d592e322e (patch)
treea2269fc72248cb43f5db0fc83c453d568d8e8daf
parent93a37955bcc0ce1b261d4e9dc280a90e416ca9e1 (diff)
downloadop-kernel-dev-9417de06e02b8d968d52e7d59e7f751d592e322e.zip
op-kernel-dev-9417de06e02b8d968d52e7d59e7f751d592e322e.tar.gz
staging: comedi: pcl816: remove subdevice pointer math
Convert the comedi_subdevice access from pointer math to array access. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/pcl816.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c
index ba6911f..f65fd66 100644
--- a/drivers/staging/comedi/drivers/pcl816.c
+++ b/drivers/staging/comedi/drivers/pcl816.c
@@ -258,7 +258,7 @@ static int pcl816_ai_insn_read(struct comedi_device *dev,
static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d)
{
struct comedi_device *dev = d;
- struct comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = &dev->subdevices[0];
int low, hi;
int timeout = 50; /* wait max 50us */
@@ -349,7 +349,7 @@ static void transfer_from_dma_buf(struct comedi_device *dev,
static irqreturn_t interrupt_pcl816_ai_mode13_dma(int irq, void *d)
{
struct comedi_device *dev = d;
- struct comedi_subdevice *s = dev->subdevices + 0;
+ struct comedi_subdevice *s = &dev->subdevices[0];
int len, bufptr, this_dma_buf;
unsigned long dma_flags;
short *ptr;
@@ -1183,7 +1183,7 @@ no_dma:
if (ret)
return ret;
- s = dev->subdevices + 0;
+ s = &dev->subdevices[0];
if (board->n_aichan > 0) {
s->type = COMEDI_SUBD_AI;
devpriv->sub_ai = s;
OpenPOWER on IntegriCloud