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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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;
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;