]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drm/nouveau/therm: check for sensor presence with requested mode, not current
authorBen Skeggs <bskeggs@redhat.com>
Mon, 24 Mar 2014 03:34:47 +0000 (13:34 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 26 Mar 2014 04:08:22 +0000 (14:08 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/therm/base.c

index 80e584a1bd1cf4e4d6a32a8e3cbfd79739acd1e3..fd1b4606e22b4a455f017e94b70cabb860f27869 100644 (file)
@@ -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)