From 5bcaed855902dd3b69e7ece8387c206bcaa2bb4d Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 30 Sep 2013 17:52:13 -0700 Subject: [PATCH] staging: comedi: ni_at_ao: tidy up the CFG3 register defines Rename the defines for the CFG3 register so they have namespace associated with the driver. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_ao.c | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_at_ao.c b/drivers/staging/comedi/drivers/ni_at_ao.c index cbf2b0c40347..d18aaf1f4392 100644 --- a/drivers/staging/comedi/drivers/ni_at_ao.c +++ b/drivers/staging/comedi/drivers/ni_at_ao.c @@ -52,14 +52,14 @@ Configuration options: #define ATAO_CFG2_PROMEN (1 << 2) #define ATAO_CFG2_SCLK (1 << 1) #define ATAO_CFG2_SDATA (1 << 0) -#define ATAO_CFG3 0x04 /* W 16 */ -#define DMAMODE (1 << 6) -#define CLKOUT (1 << 5) -#define RCLKEN (1 << 4) -#define DOUTEN2 (1 << 3) -#define DOUTEN1 (1 << 2) -#define EN2_5V (1 << 1) -#define SCANEN (1 << 0) +#define ATAO_CFG3_REG 0x04 +#define ATAO_CFG3_DMAMODE (1 << 6) +#define ATAO_CFG3_CLKOUT (1 << 5) +#define ATAO_CFG3_RCLKEN (1 << 4) +#define ATAO_CFG3_DOUTEN2 (1 << 3) +#define ATAO_CFG3_DOUTEN1 (1 << 2) +#define ATAO_CFG3_EN2_5V (1 << 1) +#define ATAO_CFG3_SCANEN (1 << 0) #define ATAO_82C53_BASE 0x06 /* RW 8 */ #define ATAO_82C53_CNTR1 0x06 /* RW 8 */ #define ATAO_82C53_CNTR2 0x07 /* RW 8 */ @@ -160,7 +160,7 @@ static void atao_reset(struct comedi_device *dev) outw(ATAO_CFG2_CALLD_NOP, dev->iobase + ATAO_CFG2_REG); devpriv->cfg3 = 0; - outw(devpriv->cfg3, dev->iobase + ATAO_CFG3); + outw(devpriv->cfg3, dev->iobase + ATAO_CFG3_REG); inw(dev->iobase + ATAO_FIFO_CLEAR); @@ -246,15 +246,15 @@ static int atao_dio_insn_config(struct comedi_device *dev, return ret; if (s->io_bits & 0x0f) - devpriv->cfg3 |= DOUTEN1; + devpriv->cfg3 |= ATAO_CFG3_DOUTEN1; else - devpriv->cfg3 &= ~DOUTEN1; + devpriv->cfg3 &= ~ATAO_CFG3_DOUTEN1; if (s->io_bits & 0xf0) - devpriv->cfg3 |= DOUTEN2; + devpriv->cfg3 |= ATAO_CFG3_DOUTEN2; else - devpriv->cfg3 &= ~DOUTEN2; + devpriv->cfg3 &= ~ATAO_CFG3_DOUTEN2; - outw(devpriv->cfg3, dev->iobase + ATAO_CFG3); + outw(devpriv->cfg3, dev->iobase + ATAO_CFG3_REG); return insn->n; } -- 2.30.2