release_dma_lock(flags);
}
+static void pcl818_isadma_disable(unsigned int dma_chan)
+{
+ unsigned long flags;
+
+ flags = claim_dma_lock();
+ disable_dma(dma_chan);
+ release_dma_lock(flags);
+}
+
static void pcl818_start_pacer(struct comedi_device *dev, bool load_counters)
{
struct pcl818_private *devpriv = dev->private;
struct pcl818_dma_desc *dma = &devpriv->dma_desc[0];
struct comedi_cmd *cmd = &s->async->cmd;
- disable_dma(devpriv->dma); /* disable dma */
+ pcl818_isadma_disable(devpriv->dma);
if (cmd->stop_src == TRIG_COUNT) {
dma->size = cmd->stop_arg * comedi_bytes_per_scan(s);
devpriv->dma_runs_to_end = dma->size / devpriv->hwdmasize;
struct comedi_cmd *cmd = &s->async->cmd;
struct pcl818_dma_desc *dma;
- disable_dma(devpriv->dma);
+ pcl818_isadma_disable(devpriv->dma);
devpriv->cur_dma = 1 - devpriv->cur_dma;
if (devpriv->dma_runs_to_end > -1 || cmd->stop_src == TRIG_NONE) {
/* switch dma bufs */
return 0;
}
}
- disable_dma(devpriv->dma);
+ pcl818_isadma_disable(devpriv->dma);
}
outb(PCL818_CTRL_DISABLE_TRIG, dev->iobase + PCL818_CTRL_REG);