From: H Hartley Sweeten Date: Tue, 4 Nov 2014 17:55:20 +0000 (-0700) Subject: staging: comedi: addi_apci_3120: move apci3120_addon_write() to driver X-Git-Tag: v3.19-rc1~66^2~259 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0b7defa70227f7c7f313e0ea4f0eeb88c5de79a3;p=karo-tx-linux.git staging: comedi: addi_apci_3120: move apci3120_addon_write() to driver Move this function from the included source file to 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 3cbcc0c9fb48..1799833cde32 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -1,17 +1,3 @@ -static void apci3120_addon_write(struct comedi_device *dev, - unsigned int val, unsigned int reg) -{ - struct apci3120_private *devpriv = dev->private; - - /* 16-bit interface for AMCC add-on registers */ - - outw(reg, devpriv->addon + APCI3120_ADDON_ADDR_REG); - outw(val & 0xffff, devpriv->addon + APCI3120_ADDON_DATA_REG); - - outw(reg + 2, devpriv->addon + APCI3120_ADDON_ADDR_REG); - outw((val >> 16) & 0xffff, devpriv->addon + APCI3120_ADDON_DATA_REG); -} - static int apci3120_cancel(struct comedi_device *dev, struct comedi_subdevice *s) { diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index 4f1ec0bc645f..dab81cbe79da 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -163,6 +163,20 @@ struct apci3120_private { unsigned short ctrl; }; +static void apci3120_addon_write(struct comedi_device *dev, + unsigned int val, unsigned int reg) +{ + struct apci3120_private *devpriv = dev->private; + + /* 16-bit interface for AMCC add-on registers */ + + outw(reg, devpriv->addon + APCI3120_ADDON_ADDR_REG); + outw(val & 0xffff, devpriv->addon + APCI3120_ADDON_DATA_REG); + + outw(reg + 2, devpriv->addon + APCI3120_ADDON_ADDR_REG); + outw((val >> 16) & 0xffff, devpriv->addon + APCI3120_ADDON_DATA_REG); +} + /* * There are three timers on the board. They all use the same base * clock with a fixed prescaler for each timer. The base clock used