From: H Hartley Sweeten Date: Tue, 9 Sep 2014 20:05:50 +0000 (-0700) Subject: staging: comedi: adl_pci9118: tidy up 'ai_cfg' in pci9118_ai_docmd_dma() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4cf13a1dc89b0f5e23ec5d33905c91e240e1f831;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: comedi: adl_pci9118: tidy up 'ai_cfg' in pci9118_ai_docmd_dma() The 'ai_cfg' was already set to PCI9118_AI_CFG_PDTRG | PCI9118_AI_CFG_PETRG. Don't bother setting those bits in pci9118_ai_docmd_dma(). 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 5961fefebf3f..48064c20103d 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -1145,10 +1145,8 @@ static int pci9118_ai_docmd_dma(struct comedi_device *dev, case 2: devpriv->ai_ctrl |= PCI9118_AI_CTRL_TMRTR | PCI9118_AI_CTRL_DMA; - devpriv->ai_cfg = PCI9118_AI_CFG_PDTRG | - PCI9118_AI_CFG_PETRG | - PCI9118_AI_CFG_BM | - PCI9118_AI_CFG_BS; + devpriv->ai_cfg |= PCI9118_AI_CFG_BM | + PCI9118_AI_CFG_BS; if (cmd->convert_src == TRIG_NOW && !devpriv->softsshdelay) devpriv->ai_cfg |= PCI9118_AI_CFG_BSSH; outl(devpriv->ai_n_realscanlen, @@ -1157,15 +1155,11 @@ static int pci9118_ai_docmd_dma(struct comedi_device *dev, case 3: devpriv->ai_ctrl |= PCI9118_AI_CTRL_EXTM | PCI9118_AI_CTRL_DMA; - devpriv->ai_cfg = PCI9118_AI_CFG_PDTRG | - PCI9118_AI_CFG_PETRG; break; case 4: devpriv->ai_ctrl |= PCI9118_AI_CTRL_TMRTR | PCI9118_AI_CTRL_DMA; - devpriv->ai_cfg = PCI9118_AI_CFG_PDTRG | - PCI9118_AI_CFG_PETRG | - PCI9118_AI_CFG_AM; + devpriv->ai_cfg |= PCI9118_AI_CFG_AM; outl(devpriv->ai_cfg, dev->iobase + PCI9118_AI_CFG_REG); pci9118_timer_set_mode(dev, 0, I8254_MODE0); pci9118_timer_write(dev, 0, dmabuf->hw >> 1);