diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2015-11-03 23:01:46 +0100 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2015-11-16 18:37:54 +0100 |
commit | 8cb87c0407cb55277d8b9aa50f0e29201b90a88d (patch) | |
tree | f6e5b3a9d6c964de699a1494d7c7d0f00cf892d0 /drivers/gpu | |
parent | Linux 4.4-rc1 (diff) | |
download | linux-8cb87c0407cb55277d8b9aa50f0e29201b90a88d.tar.xz linux-8cb87c0407cb55277d8b9aa50f0e29201b90a88d.zip |
nouveau/nvkm/subdev/clk/gk20a.c: fix wrong do_div() usage
do_div() must only be used with a u64 dividend.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c index 254094ab7fb8..5da2aa8cc333 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c @@ -141,9 +141,8 @@ gk20a_pllg_calc_rate(struct gk20a_clk *clk) rate = clk->parent_rate * clk->n; divider = clk->m * pl_to_div[clk->pl]; - do_div(rate, divider); - return rate / 2; + return rate / divider / 2; } static int |