staging: comedi: addi_apci_3120: remove 'ui_MinAcquisitiontimeNs'
authorH Hartley Sweeten <hartleys@visionengravers.com>
Fri, 2 Nov 2012 00:29:30 +0000 (17:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Nov 2012 18:23:50 +0000 (11:23 -0700)
Both boards supported by this driver have the same minimum acquisition
time.. Remove the boardinfo for it and just open code the value in
i_APCI3120_CommandTestAnalogInput().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
drivers/staging/comedi/drivers/addi_apci_3120.c

index 73af970a44eced57ed0b938675a2e13b9844e464..ac2e4110f2f84bedc520979a0da6b9731ca51614 100644 (file)
@@ -787,20 +787,15 @@ static int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev,
 
        if (cmd->convert_src == TRIG_TIMER) {   /*  Test Acquisition timing */
                if (cmd->scan_begin_src == TRIG_TIMER) {
-                       if ((cmd->convert_arg)
-                               && (cmd->convert_arg <
-                                       this_board->ui_MinAcquisitiontimeNs)) {
-                               cmd->convert_arg =
-                                       this_board->ui_MinAcquisitiontimeNs;
+                       if (cmd->convert_arg &&
+                           (cmd->convert_arg < 10000)) {
+                               cmd->convert_arg = 10000;
                                err++;
                        }
                } else {
-                       if (cmd->convert_arg <
-                               this_board->ui_MinAcquisitiontimeNs) {
-                               cmd->convert_arg =
-                                       this_board->ui_MinAcquisitiontimeNs;
+                       if (cmd->convert_arg < 10000) {
+                               cmd->convert_arg = 10000;
                                err++;
-
                        }
                }
        }
index a2fe789f01ea0738568e3ee505b3cc691bb0c532..8e32fbbf35478723b740d815a30c8ba34d5f8935 100644 (file)
@@ -26,7 +26,6 @@ static const struct addi_board apci3120_boardtypes[] = {
                .i_NbrDoChannel         = 4,
                .i_DoMaxdata            = 0x0f,
                .b_AvailableConvertUnit = 1,
-               .ui_MinAcquisitiontimeNs = 10000,
                .ui_MinDelaytimeNs      = 100000,
                .interrupt              = v_APCI3120_Interrupt,
                .ao_write               = i_APCI3120_InsnWriteAnalogOutput,
@@ -42,7 +41,6 @@ static const struct addi_board apci3120_boardtypes[] = {
                .i_NbrDoChannel         = 4,
                .i_DoMaxdata            = 0x0f,
                .b_AvailableConvertUnit = 1,
-               .ui_MinAcquisitiontimeNs = 10000,
                .ui_MinDelaytimeNs      = 100000,
                .interrupt              = v_APCI3120_Interrupt,
        },