staging: comedi: ni_tiocmd: introduce ni_tio_acknowledge()
The external callers of ni_tio_acknowledge_and_confirm() only call this function to ack any pending errors or interrupts before starting a new async command. Only the internal code in ni_tiocmd uses the data that is optionally returned by this function. Remove the export from ni_tio_acknowledge_and_confirm() and introduce a new exported function that handles passing the NULL params. 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>
This commit is contained in:
parent
4cf2f3a574
commit
f8cfd0eb3c
|
@ -749,7 +749,7 @@ static int ni_660x_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
|||
"no dma channel available for use by counter\n");
|
||||
return retval;
|
||||
}
|
||||
ni_tio_acknowledge_and_confirm(counter, NULL, NULL, NULL, NULL);
|
||||
ni_tio_acknowledge(counter);
|
||||
|
||||
return ni_tio_cmd(dev, s);
|
||||
}
|
||||
|
|
|
@ -5252,7 +5252,7 @@ static int ni_gpct_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
|||
"no dma channel available for use by counter\n");
|
||||
return retval;
|
||||
}
|
||||
ni_tio_acknowledge_and_confirm(counter, NULL, NULL, NULL, NULL);
|
||||
ni_tio_acknowledge(counter);
|
||||
ni_e_series_enable_second_irq(dev, counter->counter_index, 1);
|
||||
|
||||
return ni_tio_cmd(dev, s);
|
||||
|
|
|
@ -149,8 +149,6 @@ int ni_tio_cmdtest(struct comedi_device *, struct comedi_subdevice *,
|
|||
int ni_tio_cancel(struct ni_gpct *);
|
||||
void ni_tio_handle_interrupt(struct ni_gpct *, struct comedi_subdevice *);
|
||||
void ni_tio_set_mite_channel(struct ni_gpct *, struct mite_channel *);
|
||||
void ni_tio_acknowledge_and_confirm(struct ni_gpct *,
|
||||
int *gate_error, int *tc_error,
|
||||
int *perm_stale_data, int *stale_data);
|
||||
void ni_tio_acknowledge(struct ni_gpct *);
|
||||
|
||||
#endif /* _COMEDI_NI_TIO_H */
|
||||
|
|
|
@ -343,9 +343,11 @@ static int should_ack_gate(struct ni_gpct *counter)
|
|||
return retval;
|
||||
}
|
||||
|
||||
void ni_tio_acknowledge_and_confirm(struct ni_gpct *counter, int *gate_error,
|
||||
int *tc_error, int *perm_stale_data,
|
||||
int *stale_data)
|
||||
static void ni_tio_acknowledge_and_confirm(struct ni_gpct *counter,
|
||||
int *gate_error,
|
||||
int *tc_error,
|
||||
int *perm_stale_data,
|
||||
int *stale_data)
|
||||
{
|
||||
unsigned cidx = counter->counter_index;
|
||||
const unsigned short gxx_status = read_register(counter,
|
||||
|
@ -404,7 +406,12 @@ void ni_tio_acknowledge_and_confirm(struct ni_gpct *counter, int *gate_error,
|
|||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ni_tio_acknowledge_and_confirm);
|
||||
|
||||
void ni_tio_acknowledge(struct ni_gpct *counter)
|
||||
{
|
||||
ni_tio_acknowledge_and_confirm(counter, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ni_tio_acknowledge);
|
||||
|
||||
void ni_tio_handle_interrupt(struct ni_gpct *counter,
|
||||
struct comedi_subdevice *s)
|
||||
|
|
Loading…
Reference in a new issue