diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-03-23 23:34:47 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-03-26 00:08:22 -0400 |
commit | dcd9262b3baf881285e9e0fd5459d54723cc992e (patch) | |
tree | 20317a4bad17a254c13d58f6c4d0d6a2075e8957 | |
parent | cbc53c167921a5c86ab8fcbf41c101da741dab7d (diff) |
drm/nouveau/therm: check for sensor presence with requested mode, not current
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/therm/base.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
179 | 179 | ||
180 | /* do not allow automatic fan management if the thermal sensor is | 180 | /* do not allow automatic fan management if the thermal sensor is |
181 | * not available */ | 181 | * not available */ |
182 | if (priv->mode == NOUVEAU_THERM_CTRL_AUTO && therm->temp_get(therm) < 0) | 182 | if (mode == NOUVEAU_THERM_CTRL_AUTO && therm->temp_get(therm) < 0) |
183 | return -EINVAL; | 183 | return -EINVAL; |
184 | 184 | ||
185 | if (priv->mode == mode) | 185 | if (priv->mode == mode) |