[PATCH 03/14] staging: comedi: daqboard2000: use type 'u16' for CPLD data and status

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

 



The CPLD status and data registers used to load firmware are 16 bits
wide.  Use the type `u16` to represent data and status values instead of
`int`.

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

diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 954a1a536fb4..e73baba7c312 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -470,11 +470,11 @@ static void daqboard2000_pulse_prog_pin(struct comedi_device *dev)
 	mdelay(10);	/* Not in the original code, but I like symmetry... */
 }
 
-static int daqboard2000_poll_cpld(struct comedi_device *dev, int mask)
+static int daqboard2000_poll_cpld(struct comedi_device *dev, u16 mask)
 {
 	int result = 0;
 	int i;
-	int cpld;
+	u16 cpld;
 
 	/* timeout after 50 tries -> 5ms */
 	for (i = 0; i < 50; i++) {
@@ -489,7 +489,7 @@ static int daqboard2000_poll_cpld(struct comedi_device *dev, int mask)
 	return result;
 }
 
-static int daqboard2000_write_cpld(struct comedi_device *dev, int data)
+static int daqboard2000_write_cpld(struct comedi_device *dev, u16 data)
 {
 	int result = 0;
 
@@ -527,7 +527,7 @@ static int daqboard2000_load_firmware(struct comedi_device *dev,
 					break;
 			}
 			for (; i < len; i += 2) {
-				int data =
+				u16 data =
 				    (cpld_array[i] << 8) + cpld_array[i + 1];
 				if (!daqboard2000_write_cpld(dev, data))
 					break;
-- 
2.11.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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