aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_pm.c
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-09-23 14:36:42 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-09-24 02:29:41 -0400
commit5c4abd09bdefb41d0c80055aa9d98433624ce1f0 (patch)
tree6f8bfe5461bca1d5ecbc54894f4fbdb6719c8fc3 /drivers/gpu/drm/nouveau/nouveau_pm.c
parent66146da06643d8ee89bc5255fb0254006e3d0e79 (diff)
drm/nouveau: Misc cleanup of the PM code.
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_pm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_pm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index 85a56dea0ef7..b1d3f4b26ebd 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -227,8 +227,8 @@ nouveau_pm_set_perflvl(struct device *d, struct device_attribute *a,
227 return strlen(buf); 227 return strlen(buf);
228} 228}
229 229
230DEVICE_ATTR(performance_level, S_IRUGO | S_IWUSR, 230static DEVICE_ATTR(performance_level, S_IRUGO | S_IWUSR,
231 nouveau_pm_get_perflvl, nouveau_pm_set_perflvl); 231 nouveau_pm_get_perflvl, nouveau_pm_set_perflvl);
232 232
233static int 233static int
234nouveau_sysfs_init(struct drm_device *dev) 234nouveau_sysfs_init(struct drm_device *dev)
@@ -283,8 +283,6 @@ nouveau_sysfs_fini(struct drm_device *dev)
283 } 283 }
284} 284}
285 285
286
287
288static ssize_t 286static ssize_t
289nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf) 287nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf)
290{ 288{
@@ -317,7 +315,7 @@ nouveau_hwmon_set_max_temp(struct device *d, struct device_attribute *a,
317 struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; 315 struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp;
318 long value; 316 long value;
319 317
320 if (strict_strtoul(buf, 10, &value) == -EINVAL) 318 if (strict_strtol(buf, 10, &value) == -EINVAL)
321 return count; 319 return count;
322 320
323 temp->down_clock = value/1000; 321 temp->down_clock = value/1000;
@@ -352,7 +350,7 @@ nouveau_hwmon_set_critical_temp(struct device *d, struct device_attribute *a,
352 struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; 350 struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp;
353 long value; 351 long value;
354 352
355 if (strict_strtoul(buf, 10, &value) == -EINVAL) 353 if (strict_strtol(buf, 10, &value) == -EINVAL)
356 return count; 354 return count;
357 355
358 temp->critical = value/1000; 356 temp->critical = value/1000;