From: H Hartley Sweeten Date: Thu, 4 Sep 2014 19:14:22 +0000 (-0700) Subject: staging: comedi: adl_pci9118: rename PCI9118_SCANMOD define X-Git-Tag: v3.18-rc1~130^2~673 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=89a7dc157359cc39760551c95a51cb405834a968;p=karo-tx-linux.git staging: comedi: adl_pci9118: rename PCI9118_SCANMOD define For aesthetics, rename this define used for the analog input auto scan mode register. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index d832cb38e98a..68cecb5b49e3 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -133,8 +133,8 @@ #define PCI9118_SOFTTRG_REG 0x20 #define PCI9118_AI_CHANLIST_REG 0x24 #define PCI9118_AI_BURST_NUM_REG 0x28 +#define PCI9118_AI_AUTOSCAN_MODE_REG 0x2c -#define PCI9118_SCANMOD 0x2c /* W: A/D auto scan mode */ #define PCI9118_ADFUNC 0x30 /* W: A/D function register */ #define PCI9118_DELFIFO 0x34 /* W: A/D data FIFO reset */ #define PCI9118_INTSRC 0x38 /* R: interrupt reason register */ @@ -417,11 +417,10 @@ static int setup_channel_list(struct comedi_device *dev, outl(devpriv->AdControlReg, dev->iobase + PCI9118_AI_CTRL_REG); /* setup mode */ - - outl(2, dev->iobase + PCI9118_SCANMOD); - /* gods know why this sequence! */ - outl(0, dev->iobase + PCI9118_SCANMOD); - outl(1, dev->iobase + PCI9118_SCANMOD); + /* gods know why this sequence! */ + outl(2, dev->iobase + PCI9118_AI_AUTOSCAN_MODE_REG); + outl(0, dev->iobase + PCI9118_AI_AUTOSCAN_MODE_REG); + outl(1, dev->iobase + PCI9118_AI_AUTOSCAN_MODE_REG); #ifdef PCI9118_PARANOIDCHECK devpriv->chanlistlen = n_chan; @@ -468,7 +467,8 @@ static int setup_channel_list(struct comedi_device *dev, devpriv->chanlist[n_chan ^ usedma] = devpriv->chanlist[0 ^ usedma]; /* for 32bit operations */ #endif - outl(0, dev->iobase + PCI9118_SCANMOD); /* close scan queue */ + /* close scan queue */ + outl(0, dev->iobase + PCI9118_AI_AUTOSCAN_MODE_REG); /* udelay(100); important delay, or first sample will be crippled */ return 1; /* we can serve this with scan logic */ @@ -784,8 +784,9 @@ static int pci9118_ai_cancel(struct comedi_device *dev, * disable INT and DMA */ outl(0, dev->iobase + PCI9118_AI_BURST_NUM_REG); - outl(1, dev->iobase + PCI9118_SCANMOD); - outl(2, dev->iobase + PCI9118_SCANMOD); /* reset scan queue */ + /* reset scan queue */ + outl(1, dev->iobase + PCI9118_AI_AUTOSCAN_MODE_REG); + outl(2, dev->iobase + PCI9118_AI_AUTOSCAN_MODE_REG); outl(0, dev->iobase + PCI9118_DELFIFO); /* flush FIFO */ devpriv->ai_do = 0; @@ -1696,8 +1697,9 @@ static int pci9118_reset(struct comedi_device *dev) * disable INT and DMA */ outl(0, dev->iobase + PCI9118_AI_BURST_NUM_REG); - outl(1, dev->iobase + PCI9118_SCANMOD); - outl(2, dev->iobase + PCI9118_SCANMOD); /* reset scan queue */ + /* reset scan queue */ + outl(1, dev->iobase + PCI9118_AI_AUTOSCAN_MODE_REG); + outl(2, dev->iobase + PCI9118_AI_AUTOSCAN_MODE_REG); devpriv->AdFunctionReg = AdFunction_PDTrg | AdFunction_PETrg; outl(devpriv->AdFunctionReg, dev->iobase + PCI9118_ADFUNC); /*