summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2018-03-23 16:54:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-23 17:55:21 +0300
commit5d20e467dfadf14b9437d2b04040a3a342974ec9 (patch)
tree5c9b09cb37dbe496fa9f4ae755551c6f04af8be3 /drivers/staging/comedi
parent1e8ac83b6caf9567a8d68b3e650b7a093fd47e4b (diff)
downloadlinux-5d20e467dfadf14b9437d2b04040a3a342974ec9.tar.xz
Revert "staging: comedi: cb_pcidas64: change params to external_ai_queue_in_use()"
This reverts commit f5f3a2c6569e ("staging: comedi: cb_pcidas64: change params to external_ai_queue_in_use()"). The `external_ai_queue_in_use()` was being called from `ao_cmd()` with pointers to the "write" subdevice and AO command, but is supposed to check whether the external AI queue is currently in use by the "read" subdevice and AI command. In fact, the return value always indicated that the external AI queue was not in use in this case (because the AO command's channel list is sequential), so was fairly useless. (However, even before the reverted commit, the logic in `external_ai_queue_in_use()` was wrong. That will be corrected in a subsequent commit.) Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidas64.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
index ceef9058b59f..aa481c00e8e7 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas64.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
@@ -3247,17 +3247,15 @@ static int prep_ao_dma(struct comedi_device *dev, const struct comedi_cmd *cmd)
return 0;
}
-static inline int external_ai_queue_in_use(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_cmd *cmd)
+static inline int external_ai_queue_in_use(struct comedi_device *dev)
{
const struct pcidas64_board *board = dev->board_ptr;
- if (s->busy)
+ if (dev->read_subdev->busy)
return 0;
if (board->layout == LAYOUT_4020)
return 0;
- else if (use_internal_queue_6xxx(cmd))
+ else if (use_internal_queue_6xxx(&dev->read_subdev->async->cmd))
return 0;
return 1;
}
@@ -3291,7 +3289,7 @@ static int ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
struct pcidas64_private *devpriv = dev->private;
struct comedi_cmd *cmd = &s->async->cmd;
- if (external_ai_queue_in_use(dev, s, cmd)) {
+ if (external_ai_queue_in_use(dev)) {
warn_external_queue(dev);
return -EBUSY;
}