Browse Source

drm/nouveau: Fix parsing of the temperature constant correction.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez 14 years ago
parent
commit
67e1d4fbae
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/gpu/drm/nouveau/nouveau_temp.c

+ 2 - 2
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: