Commit 5c4abd09 authored by Francisco Jerez's avatar Francisco Jerez Committed by Ben Skeggs

drm/nouveau: Misc cleanup of the PM code.

Signed-off-by: default avatarFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 66146da0
...@@ -227,8 +227,8 @@ nouveau_pm_set_perflvl(struct device *d, struct device_attribute *a, ...@@ -227,8 +227,8 @@ nouveau_pm_set_perflvl(struct device *d, struct device_attribute *a,
return strlen(buf); return strlen(buf);
} }
DEVICE_ATTR(performance_level, S_IRUGO | S_IWUSR, static DEVICE_ATTR(performance_level, S_IRUGO | S_IWUSR,
nouveau_pm_get_perflvl, nouveau_pm_set_perflvl); nouveau_pm_get_perflvl, nouveau_pm_set_perflvl);
static int static int
nouveau_sysfs_init(struct drm_device *dev) nouveau_sysfs_init(struct drm_device *dev)
...@@ -283,8 +283,6 @@ nouveau_sysfs_fini(struct drm_device *dev) ...@@ -283,8 +283,6 @@ nouveau_sysfs_fini(struct drm_device *dev)
} }
} }
static ssize_t static ssize_t
nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf) nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf)
{ {
...@@ -317,7 +315,7 @@ nouveau_hwmon_set_max_temp(struct device *d, struct device_attribute *a, ...@@ -317,7 +315,7 @@ nouveau_hwmon_set_max_temp(struct device *d, struct device_attribute *a,
struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp;
long value; long value;
if (strict_strtoul(buf, 10, &value) == -EINVAL) if (strict_strtol(buf, 10, &value) == -EINVAL)
return count; return count;
temp->down_clock = value/1000; temp->down_clock = value/1000;
...@@ -352,7 +350,7 @@ nouveau_hwmon_set_critical_temp(struct device *d, struct device_attribute *a, ...@@ -352,7 +350,7 @@ nouveau_hwmon_set_critical_temp(struct device *d, struct device_attribute *a,
struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp;
long value; long value;
if (strict_strtoul(buf, 10, &value) == -EINVAL) if (strict_strtol(buf, 10, &value) == -EINVAL)
return count; return count;
temp->critical = value/1000; temp->critical = value/1000;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "nouveau_drv.h" #include "nouveau_drv.h"
#include "nouveau_pm.h" #include "nouveau_pm.h"
void static void
nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp) nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp)
{ {
struct drm_nouveau_private *dev_priv = dev->dev_private; struct drm_nouveau_private *dev_priv = dev->dev_private;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "drmP.h" #include "drmP.h"
#include "nouveau_drv.h" #include "nouveau_drv.h"
#include "nouveau_hw.h" #include "nouveau_hw.h"
#include "nouveau_pm.h"
struct nv04_pm_state { struct nv04_pm_state {
struct pll_lims pll; struct pll_lims pll;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment