diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index c84930ca804061b46841a9cb35eda42e2401c79b..bb1d56e887bae514c306f1c79f9248ecd99c1bed 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -418,9 +418,8 @@ static int pci9111_ai_do_cmd_test(struct comedi_device *dev, i8253_cascade_ns_to_timer(I8254_OSC_BASE_2MHZ, &dev_private->div1, &dev_private->div2, - &cmd->convert_arg, cmd->flags); - if (cmd->convert_arg != arg) - err |= -EINVAL; + &arg, cmd->flags); + err |= cfc_check_trigger_arg_is(&cmd->convert_arg, arg); } /* @@ -433,10 +432,7 @@ static int pci9111_ai_do_cmd_test(struct comedi_device *dev, if (arg < cmd->scan_begin_arg) arg *= (cmd->scan_begin_arg / arg); - if (cmd->scan_begin_arg != arg) { - cmd->scan_begin_arg = arg; - err |= -EINVAL; - } + err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, arg); } if (err)