diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-06-20 13:12:47 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:08:19 -0400 |
commit | ecac148c60d341c9e50e2b65744d2ffde5b884cb (patch) | |
tree | b960a0a2268c7fb24692faaa86c1a2f5bd010efe /drivers/staging/comedi/drivers/dt282x.c | |
parent | f83cbc53dafb9755b0002976c3956052b089c4c6 (diff) |
staging: comedi: dt282x: remove sanity checks of 's->async->prealloc_buf'
The comedi core sanity checks that the subdevice has a buffer allocated
before allowing an async command to start. The helper functions in comedi_buf
will also sanity check the buffer as a side effect of the 'alloc' helpers
with reading or writing data for the buffer.
Remove the unnecessary sanity checks in the ai/ao dma interrupt handlers.
This will allow the handlers to disable the dma and then fail when they
try to read/write the buffer. Currently dma is left enabled due to the
sanity checks.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/dt282x.c')
-rw-r--r-- | drivers/staging/comedi/drivers/dt282x.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c index d2a519d7be43..3071f11ba4f9 100644 --- a/drivers/staging/comedi/drivers/dt282x.c +++ b/drivers/staging/comedi/drivers/dt282x.c @@ -471,11 +471,6 @@ static void dt282x_ao_dma_interrupt(struct comedi_device *dev) outw(devpriv->supcsr | DT2821_CLRDMADNE, dev->iobase + DT2821_SUPCSR); - if (!s->async->prealloc_buf) { - dev_err(dev->class_dev, "no buffer in %s\n", __func__); - return; - } - i = devpriv->current_dma_index; ptr = devpriv->dma[i].buf; @@ -504,11 +499,6 @@ static void dt282x_ai_dma_interrupt(struct comedi_device *dev) outw(devpriv->supcsr | DT2821_CLRDMADNE, dev->iobase + DT2821_SUPCSR); - if (!s->async->prealloc_buf) { - dev_err(dev->class_dev, "no buffer in %s\n", __func__); - return; - } - i = devpriv->current_dma_index; ptr = devpriv->dma[i].buf; size = devpriv->dma[i].size; |