From: H Hartley Sweeten Date: Tue, 4 Nov 2014 17:54:05 +0000 (-0700) Subject: staging: comedi: addi_apci_3120: move apci3120_timer_enable() to driver source X-Git-Tag: firefly_0821_release~176^2~2665^2~334 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a8f77b40b6c20d47816cbde84254ddef68480937;p=firefly-linux-kernel-4.4.55.git staging: comedi: addi_apci_3120: move apci3120_timer_enable() to driver source Move this helper function from the included source file into the main driver source file. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 184bff4cabd3..30e12986b6a3 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -155,18 +155,6 @@ static const struct comedi_lrange range_apci3120_ai = { } }; -static void apci3120_timer_enable(struct comedi_device *dev, - unsigned int timer, bool enable) -{ - struct apci3120_private *devpriv = dev->private; - - if (enable) - devpriv->ctrl |= APCI3120_CTRL_GATE(timer); - else - devpriv->ctrl &= ~APCI3120_CTRL_GATE(timer); - outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG); -} - static int apci3120_ai_insn_config(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index 014a01495ae2..7bfb320d1312 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -208,6 +208,18 @@ static void apci3120_timer_set_mode(struct comedi_device *dev, outb(devpriv->timer_mode, dev->iobase + APCI3120_TIMER_MODE_REG); } +static void apci3120_timer_enable(struct comedi_device *dev, + unsigned int timer, bool enable) +{ + struct apci3120_private *devpriv = dev->private; + + if (enable) + devpriv->ctrl |= APCI3120_CTRL_GATE(timer); + else + devpriv->ctrl &= ~APCI3120_CTRL_GATE(timer); + outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG); +} + #include "addi-data/hwdrv_apci3120.c" static void apci3120_dma_alloc(struct comedi_device *dev)