summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2015-11-03 17:01:46 -0500
committerNicolas Pitre <nicolas.pitre@linaro.org>2015-11-16 12:37:54 -0500
commit8cb87c0407cb55277d8b9aa50f0e29201b90a88d (patch)
treef6e5b3a9d6c964de699a1494d7c7d0f00cf892d0 /drivers/gpu
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
downloadop-kernel-dev-8cb87c0407cb55277d8b9aa50f0e29201b90a88d.zip
op-kernel-dev-8cb87c0407cb55277d8b9aa50f0e29201b90a88d.tar.gz
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.c3
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 254094a..5da2aa8 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
OpenPOWER on IntegriCloud