[PATCH 47/50] staging: comedi: define struct comedi_kcmd for real

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that the low-level comedi drivers are using `struct comedi_kcmd`
instead of `struct comedi_cmd`, define the `struct comedi_kcmd` type
properly instead of faking it with a macro.

Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
 drivers/staging/comedi/comedidev.h | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 708bba6..ec0be4b 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -62,10 +62,30 @@
 #define COMEDI_NUM_BOARD_MINORS 0x30
 #define COMEDI_FIRST_SUBDEVICE_MINOR COMEDI_NUM_BOARD_MINORS
 
-/* Define kernel versions of some ioctl user API structures. */
-/* FIXME: use macros for now.  Define proper structures once the kernel
- * level code has been changed to use the kernel versions of the structures. */
-#define comedi_kcmd comedi_cmd
+/*
+ * Define kernel versions of some ioctl user API structures.
+ *
+ * Only need a kernel version of struct comedi_cmd.
+ */
+/* struct comedi_kcmd must be kept in sync with struct comedi_cmd */
+struct comedi_kcmd {
+	unsigned int subdev;
+	unsigned int flags;
+	unsigned int start_src;
+	unsigned int start_arg;
+	unsigned int scan_begin_src;
+	unsigned int scan_begin_arg;
+	unsigned int convert_src;
+	unsigned int convert_arg;
+	unsigned int scan_end_src;
+	unsigned int scan_end_arg;
+	unsigned int stop_src;
+	unsigned int stop_arg;
+	unsigned int *chanlist;
+	unsigned int chanlist_len;
+	short *data; /* unused */
+	unsigned int data_len;
+};
 
 struct comedi_subdevice {
 	struct comedi_device *device;
-- 
1.7.12

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux