From: H Hartley Sweeten Date: Tue, 1 Oct 2013 00:50:30 +0000 (-0700) Subject: staging: comedi: ni_at_ao: tidy up digital i/o register defines X-Git-Tag: MMI-PSA29.97-13-9~13364^2~497 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0960777727ea2e4e01886ea054cc9fe1ad174a26;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: comedi: ni_at_ao: tidy up digital i/o register defines The digital in and digital out registers on this board share the same address. They also effect the same digital i/o pins. To make this clear combine the two defines. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_at_ao.c b/drivers/staging/comedi/drivers/ni_at_ao.c index b7d31f7144f2..b10cb463ae4f 100644 --- a/drivers/staging/comedi/drivers/ni_at_ao.c +++ b/drivers/staging/comedi/drivers/ni_at_ao.c @@ -42,8 +42,7 @@ Configuration options: /* * Register map */ -#define ATAO_DIN 0x00 /* R 16 */ -#define ATAO_DOUT 0x00 /* W 16 */ +#define ATAO_DIO_REG 0x00 #define ATAO_CFG2 0x02 /* W 16 */ #define CALLD1 (1 << 15) #define CALLD0 (1 << 14) @@ -228,9 +227,9 @@ static int atao_dio_insn_bits(struct comedi_device *dev, unsigned int *data) { if (comedi_dio_update_state(s, data)) - outw(s->state, dev->iobase + ATAO_DOUT); + outw(s->state, dev->iobase + ATAO_DIO_REG); - data[1] = inw(dev->iobase + ATAO_DIN); + data[1] = inw(dev->iobase + ATAO_DIO_REG); return insn->n; }