Skip to content

Commit

Permalink
staging: comedi: adl_pci9111: remove pci9111_d[io]_* i/o macros
Browse files Browse the repository at this point in the history
These macros rely on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent 9d09315 commit 101e490
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ a multiple of chanlist_len*convert_arg.
#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 */
Expand Down Expand Up @@ -234,11 +234,6 @@ a multiple of chanlist_len*convert_arg.
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,
Expand Down Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 101e490

Please sign in to comment.