diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-27 17:31:04 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 21:28:55 (GMT) |
commit | f5f3a2c6569eb336e0638513ae9ccc68532c632f (patch) | |
tree | cbef3332e5d5f3aa6bfb5e5db21c2bfb21fea833 /drivers/staging/comedi | |
parent | 421ab41bce410854363a43afc49e5d95832ef887 (diff) | |
download | linux-f5f3a2c6569eb336e0638513ae9ccc68532c632f.tar.xz |
staging: comedi: cb_pcidas64: change params to external_ai_queue_in_use()
The caller already has the comedi_subdevice and comedi_cmd pointers. Pass
those variables to the helper function.
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')
-rw-r--r-- | drivers/staging/comedi/drivers/cb_pcidas64.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 63b00cf..035c3a1 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -3205,15 +3205,17 @@ 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) +static inline int external_ai_queue_in_use(struct comedi_device *dev, + struct comedi_subdevice *s, + struct comedi_cmd *cmd) { const struct pcidas64_board *thisboard = comedi_board(dev); - if (dev->read_subdev->busy) + if (s->busy) return 0; if (thisboard->layout == LAYOUT_4020) return 0; - else if (use_internal_queue_6xxx(&dev->read_subdev->async->cmd)) + else if (use_internal_queue_6xxx(cmd)) return 0; return 1; } @@ -3247,7 +3249,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)) { + if (external_ai_queue_in_use(dev, s, cmd)) { warn_external_queue(dev); return -EBUSY; } |