[PATCH 09/46] staging: comedi: adl_pci9111: remove pci9111_ao_set_data macro

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

 



This macro relies on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/adl_pci9111.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c
index 477aa2b..7d1737a 100644
--- a/drivers/staging/comedi/drivers/adl_pci9111.c
+++ b/drivers/staging/comedi/drivers/adl_pci9111.c
@@ -119,7 +119,7 @@ TODO:
 
 #define PCI9111_REGISTER_AD_FIFO_VALUE			0x00 /* AD Data stored
 								in FIFO */
-#define PCI9111_REGISTER_DA_OUTPUT			0x00
+#define PCI9111_AO_REG					0x00
 #define PCI9111_DIO_REG					0x02
 #define PCI9111_REGISTER_EXTENDED_IO_PORTS		0x04
 #define PCI9111_REGISTER_AD_CHANNEL_CONTROL		0x06 /* Channel
@@ -229,11 +229,6 @@ TODO:
 		&PCI9111_HR_AI_RESOLUTION_MASK) \
 			^ PCI9111_HR_AI_RESOLUTION_2_CMP_BIT)
 
-#define pci9111_ao_set_data(data) \
-	outw(data&PCI9111_AO_RESOLUTION_MASK, \
-		dev->iobase + PCI9111_REGISTER_DA_OUTPUT)
-
-
 static const struct comedi_lrange pci9111_hr_ai_range = {
 	5,
 	{
@@ -1055,7 +1050,8 @@ pci9111_ao_insn_write(struct comedi_device *dev,
 	int i;
 
 	for (i = 0; i < insn->n; i++) {
-		pci9111_ao_set_data(data[i]);
+		outw(data[i] & PCI9111_AO_RESOLUTION_MASK,
+			dev->iobase + PCI9111_AO_REG);
 		dev_private->ao_readback = data[i];
 	}
 
-- 
1.7.11

_______________________________________________
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