aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_pm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_pm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index 0bf64c90aa20..5566172774df 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -52,7 +52,7 @@ nouveau_pm_perflvl_aux(struct drm_device *dev, struct nouveau_pm_level *perflvl,
52{ 52{
53 struct nouveau_drm *drm = nouveau_drm(dev); 53 struct nouveau_drm *drm = nouveau_drm(dev);
54 struct nouveau_pm *pm = nouveau_pm(dev); 54 struct nouveau_pm *pm = nouveau_pm(dev);
55 struct nouveau_therm *therm = nouveau_therm(drm); 55 struct nouveau_therm *therm = nouveau_therm(drm->device);
56 int ret; 56 int ret;
57 57
58 /*XXX: not on all boards, we should control based on temperature 58 /*XXX: not on all boards, we should control based on temperature
@@ -64,7 +64,6 @@ nouveau_pm_perflvl_aux(struct drm_device *dev, struct nouveau_pm_level *perflvl,
64 ret = therm->fan_set(therm, perflvl->fanspeed); 64 ret = therm->fan_set(therm, perflvl->fanspeed);
65 if (ret && ret != -ENODEV) { 65 if (ret && ret != -ENODEV) {
66 NV_ERROR(drm, "fanspeed set failed: %d\n", ret); 66 NV_ERROR(drm, "fanspeed set failed: %d\n", ret);
67 return ret;
68 } 67 }
69 } 68 }
70 69
@@ -706,8 +705,7 @@ nouveau_hwmon_init(struct drm_device *dev)
706 struct device *hwmon_dev; 705 struct device *hwmon_dev;
707 int ret = 0; 706 int ret = 0;
708 707
709 if (!therm || !therm->temp_get || !therm->attr_get || 708 if (!therm || !therm->temp_get || !therm->attr_get || !therm->attr_set)
710 !therm->attr_set || therm->temp_get(therm) < 0)
711 return -ENODEV; 709 return -ENODEV;
712 710
713 hwmon_dev = hwmon_device_register(&dev->pdev->dev); 711 hwmon_dev = hwmon_device_register(&dev->pdev->dev);