From 0b7defa70227f7c7f313e0ea4f0eeb88c5de79a3 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 4 Nov 2014 10:55:20 -0700 Subject: [PATCH] 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 --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 14 -------------- drivers/staging/comedi/drivers/addi_apci_3120.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) 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 -- 2.39.5