From 101e490a2a2a81f41c9e82acba80a537824aa499 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 10 Sep 2012 18:52:07 -0700 Subject: [PATCH] staging: comedi: adl_pci9111: remove pci9111_d[io]_* i/o macros These macros rely on a local variable having a specific name. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index 2ac81c159f57..3c0b8c1f83dc 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -121,7 +121,7 @@ TODO: #define PCI9111_REGISTER_AD_FIFO_VALUE 0x00 /* AD Data stored in FIFO */ #define PCI9111_REGISTER_DA_OUTPUT 0x00 -#define PCI9111_REGISTER_DIGITAL_IO 0x02 +#define PCI9111_DIO_REG 0x02 #define PCI9111_REGISTER_EXTENDED_IO_PORTS 0x04 #define PCI9111_REGISTER_AD_CHANNEL_CONTROL 0x06 /* Channel selection */ @@ -234,11 +234,6 @@ TODO: outw(data&PCI9111_AO_RESOLUTION_MASK, \ dev->iobase + PCI9111_REGISTER_DA_OUTPUT) -#define pci9111_di_get_bits() \ - inw(dev->iobase + PCI9111_REGISTER_DIGITAL_IO) - -#define pci9111_do_set_bits(bits) \ - outw(bits, dev->iobase + PCI9111_REGISTER_DIGITAL_IO) static const struct comedi_lrange pci9111_hr_ai_range = { 5, @@ -1095,7 +1090,7 @@ static int pci9111_di_insn_bits(struct comedi_device *dev, { unsigned int bits; - bits = pci9111_di_get_bits(); + bits = inw(dev->iobase + PCI9111_DIO_REG); data[1] = bits; return insn->n; @@ -1120,7 +1115,7 @@ static int pci9111_do_insn_bits(struct comedi_device *dev, bits |= data[0] & data[1]; s->state = bits; - pci9111_do_set_bits(bits); + outw(bits, dev->iobase + PCI9111_DIO_REG); data[1] = bits; -- 2.20.1