Commit b8096616 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: amplc_pci230: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ed23e413
...@@ -649,14 +649,14 @@ static unsigned int pci230_divide_ns(uint64_t ns, unsigned int timebase, ...@@ -649,14 +649,14 @@ static unsigned int pci230_divide_ns(uint64_t ns, unsigned int timebase,
div = ns; div = ns;
rem = do_div(div, timebase); rem = do_div(div, timebase);
switch (flags & TRIG_ROUND_MASK) { switch (flags & CMDF_ROUND_MASK) {
default: default:
case TRIG_ROUND_NEAREST: case CMDF_ROUND_NEAREST:
div += (rem + (timebase / 2)) / timebase; div += (rem + (timebase / 2)) / timebase;
break; break;
case TRIG_ROUND_DOWN: case CMDF_ROUND_DOWN:
break; break;
case TRIG_ROUND_UP: case CMDF_ROUND_UP:
div += (rem + timebase - 1) / timebase; div += (rem + timebase - 1) / timebase;
break; break;
} }
...@@ -1735,7 +1735,7 @@ static int pci230_ai_cmdtest(struct comedi_device *dev, ...@@ -1735,7 +1735,7 @@ static int pci230_ai_cmdtest(struct comedi_device *dev,
if (!pci230_ai_check_scan_period(cmd)) { if (!pci230_ai_check_scan_period(cmd)) {
/* Was below minimum required. Round up. */ /* Was below minimum required. Round up. */
pci230_ns_to_single_timer(&cmd->scan_begin_arg, pci230_ns_to_single_timer(&cmd->scan_begin_arg,
TRIG_ROUND_UP); CMDF_ROUND_UP);
pci230_ai_check_scan_period(cmd); pci230_ai_check_scan_period(cmd);
} }
if (tmp != cmd->scan_begin_arg) if (tmp != cmd->scan_begin_arg)
...@@ -2334,7 +2334,7 @@ static int pci230_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -2334,7 +2334,7 @@ static int pci230_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
pci230_ct_setup_ns_mode(dev, 0, I8254_MODE1, pci230_ct_setup_ns_mode(dev, 0, I8254_MODE1,
((uint64_t)cmd->convert_arg * ((uint64_t)cmd->convert_arg *
cmd->scan_end_arg), cmd->scan_end_arg),
TRIG_ROUND_UP); CMDF_ROUND_UP);
if (cmd->scan_begin_src == TRIG_TIMER) { if (cmd->scan_begin_src == TRIG_TIMER) {
/* /*
* Monostable on CT0 will be triggered by * Monostable on CT0 will be triggered by
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment