diff options
| author | H Hartley Sweeten <[email protected]> | 2015-08-17 16:58:16 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-09-12 18:24:20 -0700 |
| commit | 15bccf2e5d7f5d1960c41962b2b628bd1b034ce2 (patch) | |
| tree | d553ca16387750da2f6bd9f73cfb82a162ff12bf | |
| parent | fe79b3d0c339f053a04673bff95a50f26f59222f (diff) | |
staging: comedi: s526: add defines for the ao/ai data register
The same register is used for analog output and input data. Add defines
for both for added clarity.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/staging/comedi/drivers/s526.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c index ff576d32753e..5f8a5d3aa9f7 100644 --- a/drivers/staging/comedi/drivers/s526.c +++ b/drivers/staging/comedi/drivers/s526.c @@ -65,7 +65,8 @@ #define S526_AI_CTRL_CONV(x) (1 << (5 + ((x) & 0x9))) #define S526_AI_CTRL_READ(x) (((x) & 0xf) << 1) #define S526_AI_CTRL_START BIT(0) -#define REG_ADD 0x08 +#define S526_AO_REG 0x08 +#define S526_AI_REG 0x08 #define REG_DIO 0x0A #define REG_IER 0x0C #define REG_ISR 0x0E @@ -445,8 +446,7 @@ static int s526_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s, outw(ISR_ADC_DONE, dev->iobase + REG_ISR); - /* read data */ - d = inw(dev->iobase + REG_ADD); + d = inw(dev->iobase + S526_AI_REG); /* munge data */ data[n] = d ^ 0x8000; @@ -471,7 +471,7 @@ static int s526_ao_insn_write(struct comedi_device *dev, for (i = 0; i < insn->n; i++) { val = data[i]; - outw(val, dev->iobase + REG_ADD); + outw(val, dev->iobase + S526_AO_REG); outw(ctrl, dev->iobase + S526_AO_CTRL_REG); } s->readback[chan] = val; |