aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/comedidev.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-10-13 09:56:07 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-29 15:47:11 +0800
commitbb856b6c041c200910b031b535397e2c805789c5 (patch)
treedc75eb21b7b56cfceac729b9f0998dd098db5a42 /drivers/staging/comedi/comedidev.h
parent42170711b7190824a7458b0719353912c9199bfc (diff)
staging: comedi: comedidev.h: don't expose COMEDI_CB_* defines to userspace
The COMEDI_CB_* defines are the comedi_async "events" that the drivers set to let the core detect the state of running async commands. These "events" are only relevant to the kernel modules and should not be exposed to userspace in the comedi.h user API header. Move the defines to comedidev.h to avoid exposing them. For aesthetics, convert the defines to bit shifts to better indicate that they are bitmask values. Cleanup the documentation. 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/comedidev.h')
-rw-r--r--drivers/staging/comedi/comedidev.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 1b2bbd56f6ef..0b504b1d3f00 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -213,6 +213,22 @@ struct comedi_async {
unsigned int x);
};
+/**
+ * comedi_async callback "events"
+ * @COMEDI_CB_EOS: end-of-scan
+ * @COMEDI_CB_EOA: end-of-acquisition/output
+ * @COMEDI_CB_BLOCK: data has arrived, wakes up read() / write()
+ * @COMEDI_CB_EOBUF: DEPRECATED: end of buffer
+ * @COMEDI_CB_ERROR: card error during acquisition
+ * @COMEDI_CB_OVERFLOW: buffer overflow/underflow
+ */
+#define COMEDI_CB_EOS (1 << 0)
+#define COMEDI_CB_EOA (1 << 1)
+#define COMEDI_CB_BLOCK (1 << 2)
+#define COMEDI_CB_EOBUF (1 << 3)
+#define COMEDI_CB_ERROR (1 << 4)
+#define COMEDI_CB_OVERFLOW (1 << 5)
+
struct comedi_driver {
struct comedi_driver *next;