From bbebb4ebc86e723a2c38c651dbfe54017333d307 Mon Sep 17 00:00:00 2001 From: Martin Peres Date: Sun, 7 Oct 2012 19:34:21 +0200 Subject: [PATCH] drm/nouveau/fan: fix a typo in PWM's input clock calculation Reported-by: Jukka Hopeavuori Signed-off-by: Martin Peres Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c index f87a7a3eb4e7..9360ddd469e7 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c @@ -92,7 +92,7 @@ nv50_fan_pwm_clock(struct nouveau_therm *therm) if (nv_rd32(therm, 0xc040) & 0x800000) { /* Use the HOST clock (100 MHz) * Where does this constant(2.4) comes from? */ - pwm_clock = (100000000 >> pwm_div) / 10 / 24; + pwm_clock = (100000000 >> pwm_div) * 10 / 24; } else { /* Where does this constant(20) comes from? */ pwm_clock = (crystal * 1000) >> pwm_div; -- 2.39.5