Re: linux-next: Tree for October 25 (nouveau_pm)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 26/10/2010 01:59, Randy Dunlap a écrit :
On Mon, 25 Oct 2010 14:58:34 +1100 Stephen Rothwell wrote:

Hi all,

Reminder: do not add 2.6.38 destined stuff to linux-next until after
2.6.37-rc1 is released.

drivers/built-in.o: In function `nouveau_hwmon_init':
nouveau_pm.c:(.text+0x179825): undefined reference to `hwmon_device_register'
nouveau_pm.c:(.text+0x1798b9): undefined reference to `hwmon_device_unregister'


config file is attached.
Thanks, this compiles fine with the attached patch.

I'm ready to rework it if needed.

Martin
>From 4f4af7ac5be0f418a3c0cbca1b44ab4f93216060 Mon Sep 17 00:00:00 2001
From: Martin Peres <martin.peres@xxxxxxxxxxxxxxx>
Date: Tue, 26 Oct 2010 12:48:28 +0200
Subject: [PATCH] Fix compilation issues in nouveau_pm when CONFIG_HWMON is not set

Signed-off-by: Martin Peres <martin.peres@xxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/nouveau/nouveau_pm.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index 8ef1d5b..f691661 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -405,12 +405,15 @@ nouveau_hwmon_init(struct drm_device *dev)
 {
 	struct drm_nouveau_private *dev_priv = dev->dev_private;
 	struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
+#ifdef CONFIG_HWMON
 	struct device *hwmon_dev;
 	int ret;
+#endif
 
 	if (!pm->temp_get)
 		return -ENODEV;
 
+#ifdef CONFIG_HWMON
 	hwmon_dev = hwmon_device_register(&dev->pdev->dev);
 	if (IS_ERR(hwmon_dev)) {
 		ret = PTR_ERR(hwmon_dev);
@@ -429,6 +432,9 @@ nouveau_hwmon_init(struct drm_device *dev)
 	}
 
 	pm->hwmon = hwmon_dev;
+#else
+	pm->hwmon = NULL;
+#endif
 
 	return 0;
 }
@@ -436,6 +442,7 @@ nouveau_hwmon_init(struct drm_device *dev)
 static void
 nouveau_hwmon_fini(struct drm_device *dev)
 {
+#ifdef CONFIG_HWMON
 	struct drm_nouveau_private *dev_priv = dev->dev_private;
 	struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
 
@@ -443,6 +450,7 @@ nouveau_hwmon_fini(struct drm_device *dev)
 		sysfs_remove_group(&pm->hwmon->kobj, &hwmon_attrgroup);
 		hwmon_device_unregister(pm->hwmon);
 	}
+#endif
 }
 
 #ifdef CONFIG_ACPI
-- 
1.7.3.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux