diff options
Diffstat (limited to 'linux/drivers/media/dvb/frontends/tda10021.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda10021.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda10021.c b/linux/drivers/media/dvb/frontends/tda10021.c index 242636e59..f410fd5e2 100644 --- a/linux/drivers/media/dvb/frontends/tda10021.c +++ b/linux/drivers/media/dvb/frontends/tda10021.c @@ -29,6 +29,7 @@ #include <linux/string.h> #include <linux/slab.h> +#include "compat.h" #include "dvb_frontend.h" #include "tda1002x.h" @@ -176,7 +177,7 @@ static int tda10021_set_symbolrate (struct tda10021_state* state, u32 symbolrate tmp = ((symbolrate << 4) % FIN) << 8; ratio = (ratio << 8) + tmp / FIN; tmp = (tmp % FIN) << 8; - ratio = (ratio << 8) + (tmp + FIN/2) / FIN; + ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, FIN); BDR = ratio; BDRI = (((XIN << 5) / symbolrate) + 1) / 2; |