Move the analog output range definition from hwdrv_apci3501.c into
the main driver file.

For aesthetic reasons, rename the range table so it has namespace
associated with the driver.

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c | 8 --------
 drivers/staging/comedi/drivers/addi_apci_3501.c           | 9 ++++++++-
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c 
b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c
index bbdda4e..9739e8b 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c
@@ -64,14 +64,6 @@ You should also find the complete GPL in the COPYING file 
accompanying this sour
 #define ADDIDATA_TIMER                 0
 #define ADDIDATA_WATCHDOG              2
 
-/* ANALOG OUTPUT RANGE */
-static struct comedi_lrange range_apci3501_ao = {
-       2, {
-               BIP_RANGE(10),
-               UNI_RANGE(10)
-       }
-};
-
 /*
 +----------------------------------------------------------------------------+
 | Function   Name   : int i_APCI3501_ConfigAnalogOutput                      |
diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c 
b/drivers/staging/comedi/drivers/addi_apci_3501.c
index a7527a2..b4679b2 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3501.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3501.c
@@ -40,6 +40,13 @@ struct apci3501_private {
        unsigned char b_InterruptMode;
 };
 
+static struct comedi_lrange apci3501_ao_range = {
+       2, {
+               BIP_RANGE(10),
+               UNI_RANGE(10)
+       }
+};
+
 #include "addi-data/hwdrv_apci3501.c"
 
 static int apci3501_di_insn_bits(struct comedi_device *dev,
@@ -274,7 +281,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
                s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
                s->n_chan       = ao_n_chan;
                s->maxdata      = 0x3fff;
-               s->range_table  = &range_apci3501_ao;
+               s->range_table  = &apci3501_ao_range;
                s->insn_config  = i_APCI3501_ConfigAnalogOutput;
                s->insn_write   = i_APCI3501_WriteAnalogOutput;
        } else {
-- 
1.8.1.1.293.gfe73786

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to