summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/comedidev.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2015-01-20 12:06:00 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-25 19:59:09 +0800
commit84bb0bccd26ec3029124a9dd200b985c1cde77bd (patch)
treec83a6733ee374c6d7f08109a6e7952b68d01403e /drivers/staging/comedi/comedidev.h
parent738e1e1bd7995208e968fe9ad5424856f7f44b65 (diff)
staging: comedi: comedidev.h: add namespace to the subdevice "runflags"
Tidy up and document the subdevice "runflags". Rename them so they have comedi namespace. 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.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 928572fc958c..e5daaeb6b013 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -302,15 +302,22 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s);
struct comedi_device *comedi_dev_get_from_minor(unsigned minor);
int comedi_dev_put(struct comedi_device *dev);
-/* subdevice runflags */
-enum subdevice_runflags {
- SRF_RT = 0x00000002,
- /* indicates an COMEDI_CB_ERROR event has occurred since the last
- * command was started */
- SRF_ERROR = 0x00000004,
- SRF_RUNNING = 0x08000000,
- SRF_FREE_SPRIV = 0x80000000, /* free s->private on detach */
-};
+/**
+ * comedi_subdevice "runflags"
+ * @COMEDI_SRF_RT: DEPRECATED: command is running real-time
+ * @COMEDI_SRF_ERROR: indicates an COMEDI_CB_ERROR event has occurred
+ * since the last command was started
+ * @COMEDI_SRF_RUNNING: command is running
+ * @COMEDI_SRF_FREE_SPRIV: free s->private on detach
+ *
+ * @COMEDI_SRF_BUSY_MASK: runflags that indicate the subdevice is "busy"
+ */
+#define COMEDI_SRF_RT BIT(1)
+#define COMEDI_SRF_ERROR BIT(2)
+#define COMEDI_SRF_RUNNING BIT(27)
+#define COMEDI_SRF_FREE_SPRIV BIT(31)
+
+#define COMEDI_SRF_BUSY_MASK (COMEDI_SRF_ERROR | COMEDI_SRF_RUNNING)
bool comedi_is_subdevice_running(struct comedi_subdevice *s);