OSDN Git Service

media: cxd2841er: use DIV_ROUND_UP to calculate timeout
authorZheng Yongjun <zhengyongjun3@huawei.com>
Tue, 22 Dec 2020 13:32:14 +0000 (14:32 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 14 Jan 2021 12:46:37 +0000 (13:46 +0100)
Don't open-code DIV_ROUND_UP() kernel macro.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/dvb-frontends/cxd2841er.c

index 758c95b..5431f92 100644 (file)
@@ -3338,7 +3338,7 @@ static int cxd2841er_set_frontend_s(struct dvb_frontend *fe)
                cxd2841er_tuner_set(fe);
 
        cxd2841er_tune_done(priv);
-       timeout = ((3000000 + (symbol_rate - 1)) / symbol_rate) + 150;
+       timeout = DIV_ROUND_UP(3000000, symbol_rate) + 150;
 
        i = 0;
        do {