From 67e1d4fbaefd6a27b55523bb6bb0dd941351a325 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Thu, 23 Sep 2010 17:01:05 +0200 Subject: drm/nouveau: Fix parsing of the temperature constant correction. Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_temp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_temp.c b/drivers/gpu/drm/nouveau/nouveau_temp.c index 54e3d9222f79..86b170a851be 100644 --- a/drivers/gpu/drm/nouveau/nouveau_temp.c +++ b/drivers/gpu/drm/nouveau/nouveau_temp.c @@ -113,8 +113,8 @@ nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp) switch (temp[0]) { case 0x01: - value = (value&0x8f) == 0 ? (value >> 9) & 0x7f : 0; - sensor->offset_constant = value; + if ((value & 0x8f) == 0) + sensor->offset_constant = (value >> 9) & 0x7f; break; case 0x04: -- cgit v1.2.1