diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging/comedi/drivers/mite.c index 6c8bd7c33082a1c8814b579ccc1871e2f83b0c65..2d224cfe72e375fe8ffcfc9691e09152322526b4 100644 --- a/drivers/staging/comedi/drivers/mite.c +++ b/drivers/staging/comedi/drivers/mite.c @@ -307,8 +307,9 @@ EXPORT_SYMBOL_GPL(mite_dma_arm); /**************************************/ int mite_buf_change(struct mite_dma_descriptor_ring *ring, - struct comedi_async *async) + struct comedi_subdevice *s) { + struct comedi_async *async = s->async; unsigned int n_links; int i; @@ -333,7 +334,7 @@ int mite_buf_change(struct mite_dma_descriptor_ring *ring, n_links * sizeof(struct mite_dma_descriptor), &ring->descriptors_dma_addr, GFP_KERNEL); if (!ring->descriptors) { - dev_err(async->subdevice->device->class_dev, + dev_err(s->device->class_dev, "mite: ring buffer allocation failed\n"); return -ENOMEM; } diff --git a/drivers/staging/comedi/drivers/mite.h b/drivers/staging/comedi/drivers/mite.h index 78f2357479913e054e084bb4ced30e670327fb2c..929b9bb3fcedecfa9e3902ffd105b72d45ae125b 100644 --- a/drivers/staging/comedi/drivers/mite.h +++ b/drivers/staging/comedi/drivers/mite.h @@ -120,7 +120,7 @@ int mite_done(struct mite_channel *mite_chan); void mite_prep_dma(struct mite_channel *mite_chan, unsigned int num_device_bits, unsigned int num_memory_bits); int mite_buf_change(struct mite_dma_descriptor_ring *ring, - struct comedi_async *async); + struct comedi_subdevice *s); static inline int CHAN_OFFSET(int channel) { diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 2858b3d559c1fe1b492bb74d0f69252606d4432f..3901e3b5ba5115c1c3929eec2430ef251e363772 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -836,7 +836,7 @@ static int ni_660x_buf_change(struct comedi_device *dev, struct ni_gpct *counter = s->private; int ret; - ret = mite_buf_change(mite_ring(devpriv, counter), s->async); + ret = mite_buf_change(mite_ring(devpriv, counter), s); if (ret < 0) return ret; diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index d0ad82a3b4b9b44c3d968bc896d7017f77eeb033..1f8423504031b15afd3c5539ea232ce5b0f3f7ab 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -806,7 +806,7 @@ static int ni_pcidio_change(struct comedi_device *dev, struct nidio96_private *devpriv = dev->private; int ret; - ret = mite_buf_change(devpriv->di_mite_ring, s->async); + ret = mite_buf_change(devpriv->di_mite_ring, s); if (ret < 0) return ret; diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c index d40df072583cba425d5d84b71bfd291d295d0a47..89300dc78e3529d7daa1a57700c405d6d307fea7 100644 --- a/drivers/staging/comedi/drivers/ni_pcimio.c +++ b/drivers/staging/comedi/drivers/ni_pcimio.c @@ -1560,7 +1560,7 @@ static int pcimio_ai_change(struct comedi_device *dev, struct ni_private *devpriv = dev->private; int ret; - ret = mite_buf_change(devpriv->ai_mite_ring, s->async); + ret = mite_buf_change(devpriv->ai_mite_ring, s); if (ret < 0) return ret; @@ -1573,7 +1573,7 @@ static int pcimio_ao_change(struct comedi_device *dev, struct ni_private *devpriv = dev->private; int ret; - ret = mite_buf_change(devpriv->ao_mite_ring, s->async); + ret = mite_buf_change(devpriv->ao_mite_ring, s); if (ret < 0) return ret; @@ -1587,7 +1587,7 @@ static int pcimio_gpct0_change(struct comedi_device *dev, struct ni_private *devpriv = dev->private; int ret; - ret = mite_buf_change(devpriv->gpct_mite_ring[0], s->async); + ret = mite_buf_change(devpriv->gpct_mite_ring[0], s); if (ret < 0) return ret; @@ -1601,7 +1601,7 @@ static int pcimio_gpct1_change(struct comedi_device *dev, struct ni_private *devpriv = dev->private; int ret; - ret = mite_buf_change(devpriv->gpct_mite_ring[1], s->async); + ret = mite_buf_change(devpriv->gpct_mite_ring[1], s); if (ret < 0) return ret; @@ -1614,7 +1614,7 @@ static int pcimio_dio_change(struct comedi_device *dev, struct ni_private *devpriv = dev->private; int ret; - ret = mite_buf_change(devpriv->cdo_mite_ring, s->async); + ret = mite_buf_change(devpriv->cdo_mite_ring, s); if (ret < 0) return ret;