From 97e998de5dd8c06900badb6822bf81497448c92a Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Thu, 1 Nov 2012 17:29:30 -0700 Subject: [PATCH] staging: comedi: addi_apci_3120: remove 'ui_MinAcquisitiontimeNs' 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 15 +++++---------- drivers/staging/comedi/drivers/addi_apci_3120.c | 2 -- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 73af970a44ec..ac2e4110f2f8 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -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++; - } } } diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index a2fe789f01ea..8e32fbbf3547 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -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, }, -- 2.20.1