From 11cff66f5fbb84bbf97133f9950f03ccb05b4cc5 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Mon, 2 Jul 2001 23:59:04 +0000 Subject: [PATCH] masked flags in divisor functions, so argument doesn't need to be masked before passing to functions --- comedi/drivers/8253.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/comedi/drivers/8253.h b/comedi/drivers/8253.h index 66975036..374f74df 100644 --- a/comedi/drivers/8253.h +++ b/comedi/drivers/8253.h @@ -24,6 +24,8 @@ #ifndef _8253_H #define _8253_H +#include + #define i8253_cascade_ns_to_timer i8253_cascade_ns_to_timer_2div static inline void i8253_cascade_ns_to_timer_2div_old(int i8253_osc_base, unsigned int *d1, unsigned int *d2, unsigned int *nanosec, int round_mode) @@ -80,6 +82,7 @@ static inline void i8253_cascade_ns_to_timer_power(int i8253_osc_base, unsigned for (div1 = 2; div1 <= (1 << 16); div1 <<= 1) { base = i8253_osc_base * div1; + round_mode &= TRIG_ROUND_MASK; switch (round_mode) { case TRIG_ROUND_NEAREST: default: @@ -161,6 +164,7 @@ static inline void i8253_cascade_ns_to_timer_2div(int i8253_osc_base, } } + round_mode &= TRIG_ROUND_MASK; switch (round_mode) { case TRIG_ROUND_NEAREST: default: @@ -190,7 +194,7 @@ static inline void i8253_cascade_ns_to_timer_2div(int i8253_osc_base, return; } -/* Programs 8254 counter chip. I don't know if this works for 8253. +/* Programs 8254 counter chip. It should also work for the 8253. * base_address is the lowest io address for the chip (the address of counter 0). * counter_number is the counter you want to load (0,1 or 2) * count is the number to load into the counter. -- 2.26.2