From: Ben Skeggs Date: Mon, 24 Mar 2014 03:34:47 +0000 (+1000) Subject: drm/nouveau/therm: check for sensor presence with requested mode, not current X-Git-Tag: v3.15-rc1~51^2~39^2~6 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=dcd9262b3baf881285e9e0fd5459d54723cc992e;p=uclinux-h8%2Flinux.git drm/nouveau/therm: check for sensor presence with requested mode, not current Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c index 80e584a1bd1c..fd1b4606e22b 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c @@ -179,7 +179,7 @@ nouveau_therm_fan_mode(struct nouveau_therm *therm, int mode) /* do not allow automatic fan management if the thermal sensor is * not available */ - if (priv->mode == NOUVEAU_THERM_CTRL_AUTO && therm->temp_get(therm) < 0) + if (mode == NOUVEAU_THERM_CTRL_AUTO && therm->temp_get(therm) < 0) return -EINVAL; if (priv->mode == mode)