summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-07-28 10:27:04 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-30 16:51:01 -0700
commitf8cfd0eb3c11337844215c5e93937c561858eb13 (patch)
treee2e1a2f8833b435beb0b3c62fdf4e549e793c7ae /drivers/staging/comedi
parent4cf2f3a5745f4fbcd9eb80e3bb1406be6d95cf26 (diff)
downloadtalos-obmc-linux-f8cfd0eb3c11337844215c5e93937c561858eb13.tar.gz
talos-obmc-linux-f8cfd0eb3c11337844215c5e93937c561858eb13.zip
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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/ni_660x.c2
-rw-r--r--drivers/staging/comedi/drivers/ni_mio_common.c2
-rw-r--r--drivers/staging/comedi/drivers/ni_tio.h4
-rw-r--r--drivers/staging/comedi/drivers/ni_tiocmd.c15
4 files changed, 14 insertions, 9 deletions
diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c
index 20fe692fd8f0..ef4a8f0fb29c 100644
--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -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);
}
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index 4285f0718012..888ec8ddf63b 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -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);
diff --git a/drivers/staging/comedi/drivers/ni_tio.h b/drivers/staging/comedi/drivers/ni_tio.h
index 1056bf001e5e..25aedd0e5867 100644
--- a/drivers/staging/comedi/drivers/ni_tio.h
+++ b/drivers/staging/comedi/drivers/ni_tio.h
@@ -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 */
diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c
index c360667b1ba4..299ceddfb233 100644
--- a/drivers/staging/comedi/drivers/ni_tiocmd.c
+++ b/drivers/staging/comedi/drivers/ni_tiocmd.c
@@ -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)
OpenPOWER on IntegriCloud