diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-28 16:26:37 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-18 14:33:51 -0700 |
commit | f8246dfadb8a9661d0f79138115370df6c81bd56 (patch) | |
tree | f04156bfdb2b8963031f8cefe58402fcd49b6584 /drivers | |
parent | 189e173681d8b4a84e2e071816fe30b64710efaa (diff) |
staging: comedi: ni_mio_common: remove forward declaration 14
Move shutdown_ai_command() to remove the need for the forward
declaration.
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')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_mio_common.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 9897f320325d..e5463c9253aa 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -211,7 +211,6 @@ static int ni_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s, unsigned int trignum); static void ni_load_channelgain_list(struct comedi_device *dev, unsigned int n_chan, unsigned int *list); -static void shutdown_ai_command(struct comedi_device *dev); static void handle_gpct_interrupt(struct comedi_device *dev, unsigned short counter_index); @@ -822,8 +821,22 @@ static int ni_ao_wait_for_dma_load(struct comedi_device *dev) } return 0; } - #endif /* PCIDMA */ + +static void shutdown_ai_command(struct comedi_device *dev) +{ + struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV]; + +#ifdef PCIDMA + ni_ai_drain_dma(dev); +#endif + ni_handle_fifo_dregs(dev); + get_last_sample_611x(dev); + get_last_sample_6143(dev); + + s->async->events |= COMEDI_CB_EOA; +} + static void ni_handle_eos(struct comedi_device *dev, struct comedi_subdevice *s) { struct ni_private *devpriv = dev->private; @@ -849,20 +862,6 @@ static void ni_handle_eos(struct comedi_device *dev, struct comedi_subdevice *s) shutdown_ai_command(dev); } -static void shutdown_ai_command(struct comedi_device *dev) -{ - struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV]; - -#ifdef PCIDMA - ni_ai_drain_dma(dev); -#endif - ni_handle_fifo_dregs(dev); - get_last_sample_611x(dev); - get_last_sample_6143(dev); - - s->async->events |= COMEDI_CB_EOA; -} - static void handle_gpct_interrupt(struct comedi_device *dev, unsigned short counter_index) { |