diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-28 19:26:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-18 17:33:51 -0400 |
commit | 8511b8582378c7dbf8f75015fae5570a6a46250a (patch) | |
tree | 37408937eced487fe5a9b3c4364c7e7ecc7bc58f | |
parent | f8246dfadb8a9661d0f79138115370df6c81bd56 (diff) |
staging: comedi: ni_mio_common: remove forward declaration 15
Move ni_ai_inttrig() 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>
-rw-r--r-- | drivers/staging/comedi/drivers/ni_mio_common.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index e5463c9253aa..d520417fc0dc 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c | |||
@@ -207,8 +207,6 @@ static int ni_ao_fifo_half_empty(struct comedi_device *dev, | |||
207 | struct comedi_subdevice *s); | 207 | struct comedi_subdevice *s); |
208 | #endif | 208 | #endif |
209 | static void ni_handle_fifo_dregs(struct comedi_device *dev); | 209 | static void ni_handle_fifo_dregs(struct comedi_device *dev); |
210 | static int ni_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s, | ||
211 | unsigned int trignum); | ||
212 | static void ni_load_channelgain_list(struct comedi_device *dev, | 210 | static void ni_load_channelgain_list(struct comedi_device *dev, |
213 | unsigned int n_chan, unsigned int *list); | 211 | unsigned int n_chan, unsigned int *list); |
214 | 212 | ||
@@ -2151,6 +2149,23 @@ static int ni_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, | |||
2151 | return 0; | 2149 | return 0; |
2152 | } | 2150 | } |
2153 | 2151 | ||
2152 | static int ni_ai_inttrig(struct comedi_device *dev, | ||
2153 | struct comedi_subdevice *s, | ||
2154 | unsigned int trig_num) | ||
2155 | { | ||
2156 | struct ni_private *devpriv = dev->private; | ||
2157 | struct comedi_cmd *cmd = &s->async->cmd; | ||
2158 | |||
2159 | if (trig_num != cmd->start_arg) | ||
2160 | return -EINVAL; | ||
2161 | |||
2162 | devpriv->stc_writew(dev, AI_START1_Pulse | devpriv->ai_cmd2, | ||
2163 | AI_Command_2_Register); | ||
2164 | s->async->inttrig = NULL; | ||
2165 | |||
2166 | return 1; | ||
2167 | } | ||
2168 | |||
2154 | static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | 2169 | static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) |
2155 | { | 2170 | { |
2156 | const struct ni_board_struct *board = comedi_board(dev); | 2171 | const struct ni_board_struct *board = comedi_board(dev); |
@@ -2446,23 +2461,6 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
2446 | return 0; | 2461 | return 0; |
2447 | } | 2462 | } |
2448 | 2463 | ||
2449 | static int ni_ai_inttrig(struct comedi_device *dev, | ||
2450 | struct comedi_subdevice *s, | ||
2451 | unsigned int trig_num) | ||
2452 | { | ||
2453 | struct ni_private *devpriv = dev->private; | ||
2454 | struct comedi_cmd *cmd = &s->async->cmd; | ||
2455 | |||
2456 | if (trig_num != cmd->start_arg) | ||
2457 | return -EINVAL; | ||
2458 | |||
2459 | devpriv->stc_writew(dev, AI_START1_Pulse | devpriv->ai_cmd2, | ||
2460 | AI_Command_2_Register); | ||
2461 | s->async->inttrig = NULL; | ||
2462 | |||
2463 | return 1; | ||
2464 | } | ||
2465 | |||
2466 | static int ni_ai_config_analog_trig(struct comedi_device *dev, | 2464 | static int ni_ai_config_analog_trig(struct comedi_device *dev, |
2467 | struct comedi_subdevice *s, | 2465 | struct comedi_subdevice *s, |
2468 | struct comedi_insn *insn, | 2466 | struct comedi_insn *insn, |