drm/nouveau: Misc cleanup of the PM code.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 23 Sep 2010 18:36:42 +0000 (20:36 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 24 Sep 2010 06:29:41 +0000 (16:29 +1000)
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_pm.c
drivers/gpu/drm/nouveau/nouveau_temp.c
drivers/gpu/drm/nouveau/nv04_pm.c

index 85a56de..b1d3f4b 100644 (file)
@@ -227,8 +227,8 @@ nouveau_pm_set_perflvl(struct device *d, struct device_attribute *a,
        return strlen(buf);
 }
 
-DEVICE_ATTR(performance_level, S_IRUGO | S_IWUSR,
-           nouveau_pm_get_perflvl, nouveau_pm_set_perflvl);
+static DEVICE_ATTR(performance_level, S_IRUGO | S_IWUSR,
+                  nouveau_pm_get_perflvl, nouveau_pm_set_perflvl);
 
 static int
 nouveau_sysfs_init(struct drm_device *dev)
@@ -283,8 +283,6 @@ nouveau_sysfs_fini(struct drm_device *dev)
        }
 }
 
-
-
 static ssize_t
 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,
        struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp;
        long value;
 
-       if (strict_strtoul(buf, 10, &value) == -EINVAL)
+       if (strict_strtol(buf, 10, &value) == -EINVAL)
                return count;
 
        temp->down_clock = value/1000;
@@ -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;
        long value;
 
-       if (strict_strtoul(buf, 10, &value) == -EINVAL)
+       if (strict_strtol(buf, 10, &value) == -EINVAL)
                return count;
 
        temp->critical = value/1000;
index f9eda87..16bbbf1 100644 (file)
@@ -27,7 +27,7 @@
 #include "nouveau_drv.h"
 #include "nouveau_pm.h"
 
-void
+static void
 nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp)
 {
        struct drm_nouveau_private *dev_priv = dev->dev_private;
index 15e4b90..61ca927 100644 (file)
@@ -25,6 +25,7 @@
 #include "drmP.h"
 #include "nouveau_drv.h"
 #include "nouveau_hw.h"
+#include "nouveau_pm.h"
 
 struct nv04_pm_state {
        struct pll_lims pll;