[PATCH 02/50] staging: comedi: addi-data: use struct comedi_kcmd

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

 



Use `comedi_kcmd` instead of `comedi_cmd`.

Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
 .../staging/comedi/drivers/addi-data/addi_common.h |  2 +-
 .../comedi/drivers/addi-data/hwdrv_apci3120.c      | 31 ++++++++++--------
 .../comedi/drivers/addi-data/hwdrv_apci3120.h      |  5 +--
 .../comedi/drivers/addi-data/hwdrv_apci3200.c      | 37 +++++++++++-----------
 .../comedi/drivers/addi-data/hwdrv_apci3200.h      |  5 +--
 5 files changed, 42 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h
index b7bbb71..8c1f2fb 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.h
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h
@@ -108,7 +108,7 @@ struct addi_board {
 	int (*ai_bits)(struct comedi_device *, struct comedi_subdevice *,
 		       struct comedi_insn *, unsigned int *);
 	int (*ai_cmdtest)(struct comedi_device *, struct comedi_subdevice *,
-			  struct comedi_cmd *);
+			  struct comedi_kcmd *);
 	int (*ai_cmd)(struct comedi_device *, struct comedi_subdevice *);
 	int (*ai_cancel)(struct comedi_device *, struct comedi_subdevice *);
 
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
index d61fce0..bf5e51e 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
@@ -458,25 +458,27 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_su
 
 /*
 +----------------------------------------------------------------------------+
-| Function name     :int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev|
-|			,struct comedi_subdevice *s,struct comedi_cmd *cmd)					 |
-|                                        									 |
+| Function name     : int i_APCI3120_CommandTestAnalogInput(		     |
+|			struct comedi_device *dev			     |
+|			,struct comedi_subdevice *s,struct comedi_kcmd *cmd) |
+|									     |
 +----------------------------------------------------------------------------+
 | Task              : Test validity for a command for cyclic anlog input     |
-|                       acquisition  						     			 |
-|                     										                 |
+|		      acquisition					     |
+|									     |
 +----------------------------------------------------------------------------+
-| Input Parameters  : struct comedi_device *dev									 |
-|                     struct comedi_subdevice *s									 |
-|                     struct comedi_cmd *cmd              					         |
+| Input Parameters  : struct comedi_device *dev				     |
+|                     struct comedi_subdevice *s			     |
+|		      struct comedi_kcmd *cmd				     |
 +----------------------------------------------------------------------------+
-| Return Value      :0              					                     |
-|                    													     |
+| Return Value      : 0							     |
+|									     |
 +----------------------------------------------------------------------------+
 */
 
-int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
-	struct comedi_cmd *cmd)
+int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev,
+				      struct comedi_subdevice *s,
+				      struct comedi_kcmd *cmd)
 {
 	int err = 0;
 	int tmp;		/*  divisor1,divisor2; */
@@ -633,9 +635,10 @@ int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_s
 +----------------------------------------------------------------------------+
 */
 
-int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s)
+int i_APCI3120_CommandAnalogInput(struct comedi_device *dev,
+				  struct comedi_subdevice *s)
 {
-	struct comedi_cmd *cmd = &s->async->cmd;
+	struct comedi_kcmd *cmd = &s->async->cmd;
 
 	/* loading private structure with cmd structure inputs */
 	devpriv->ui_AiFlags = cmd->flags;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h
index 50eb0a0..e390f61 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h
@@ -242,8 +242,9 @@ int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, struct comedi_su
 				     struct comedi_insn *insn, unsigned int *data);
 int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
 				   struct comedi_insn *insn, unsigned int *data);
-int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
-				      struct comedi_cmd *cmd);
+int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev,
+				      struct comedi_subdevice *s,
+				      struct comedi_kcmd *cmd);
 int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
 /* int i_APCI3120_CancelAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s); */
 int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
index f6f5092..5694dde 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
@@ -2533,30 +2533,28 @@ int i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device *dev,
 
 /*
   +----------------------------------------------------------------------------+
-  | Function name     :int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev|
-  |			,struct comedi_subdevice *s,struct comedi_cmd *cmd)			         |
-  |                                        									 |
+  | Function name     : int i_APCI3200_CommandTestAnalogInput(		       |
+  |			struct comedi_device *dev			       |
+  |			,struct comedi_subdevice *s,struct comedi_kcmd *cmd)   |
+  |									       |
   +----------------------------------------------------------------------------+
   | Task              : Test validity for a command for cyclic anlog input     |
-  |                       acquisition  						     			 |
-  |                     										                 |
+  |			acquisition					       |
+  |									       |
   +----------------------------------------------------------------------------+
-  | Input Parameters  : struct comedi_device *dev									 |
-  |                     struct comedi_subdevice *s									 |
-  |                     struct comedi_cmd *cmd              					         |
-  |                     										                 |
-  |
-  |                     										                 |
-  |                     										                 |
-  |                     										                 |
+  | Input Parameters  : struct comedi_device *dev			       |
+  |                     struct comedi_subdevice *s			       |
+  |                     struct comedi_kcmd *cmd				       |
+  |									       |
   +----------------------------------------------------------------------------+
-  | Return Value      :0              					                     |
-  |                    													     |
+  | Return Value      : 0						       |
+  |									       |
   +----------------------------------------------------------------------------+
 */
 
-int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
-	struct comedi_cmd *cmd)
+int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev,
+				      struct comedi_subdevice *s,
+				      struct comedi_kcmd *cmd)
 {
 
 	int err = 0;
@@ -2809,9 +2807,10 @@ int i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_su
   +----------------------------------------------------------------------------+
 */
 
-int i_APCI3200_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s)
+int i_APCI3200_CommandAnalogInput(struct comedi_device *dev,
+				  struct comedi_subdevice *s)
 {
-	struct comedi_cmd *cmd = &s->async->cmd;
+	struct comedi_kcmd *cmd = &s->async->cmd;
 	unsigned int ui_Configuration = 0;
 	/* INT  i_CurrentSource = 0; */
 	unsigned int ui_Trigger = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h
index 812a9c4..aebf1e2 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h
@@ -170,8 +170,9 @@ int i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device *dev,
 					 struct comedi_insn *insn, unsigned int *data);
 int i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
 int i_APCI3200_InterruptHandleEos(struct comedi_device *dev);
-int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
-				      struct comedi_cmd *cmd);
+int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev,
+				      struct comedi_subdevice *s,
+				      struct comedi_kcmd *cmd);
 int i_APCI3200_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
 int i_APCI3200_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
 				struct comedi_insn *insn, unsigned int *data);
-- 
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