From: H Hartley Sweeten Date: Tue, 4 Nov 2014 17:55:32 +0000 (-0700) Subject: staging: comedi: addi_apci_3120: absorb apci3120_ai_reset_fifo() X-Git-Tag: v3.19-rc1~66^2~247 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=34216792e006d70bcfdf1931e24e4eb2e2af9498;p=karo-tx-linux.git staging: comedi: addi_apci_3120: absorb apci3120_ai_reset_fifo() This function is only called by apci3120_set_chanlist(). Absorb it. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index f00b9ba070b7..e9816e7a235d 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -395,12 +395,6 @@ static void apci3120_exttrig_enable(struct comedi_device *dev, bool enable) outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG); } -static void apci3120_ai_reset_fifo(struct comedi_device *dev) -{ - /* a dummy read of APCI3120_TIMER_MODE_REG resets the ai FIFO */ - inw(dev->iobase + APCI3120_TIMER_MODE_REG); -} - static void apci3120_set_chanlist(struct comedi_device *dev, struct comedi_subdevice *s, int n_chan, unsigned int *chanlist) @@ -424,7 +418,8 @@ static void apci3120_set_chanlist(struct comedi_device *dev, outw(val, dev->iobase + APCI3120_CHANLIST_REG); } - apci3120_ai_reset_fifo(dev); + /* a dummy read of APCI3120_TIMER_MODE_REG resets the ai FIFO */ + inw(dev->iobase + APCI3120_TIMER_MODE_REG); /* set scan length (PR) and scan start (PA) */ devpriv->ctrl = APCI3120_CTRL_PR(n_chan - 1) | APCI3120_CTRL_PA(0);