All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Peres <martin.peres@free.fr>
To: dri-devel@lists.freedesktop.org
Subject: Re: linux-next: Tree for October 11 (nouveau)
Date: Tue, 12 Oct 2010 03:40:03 +0200	[thread overview]
Message-ID: <4CB3BC73.1020706@free.fr> (raw)
In-Reply-To: <20101011092915.66afd35b.randy.dunlap@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

  Le 11/10/2010 18:29, Randy Dunlap a écrit :
> When CONFIG_HWMON is not enabled:
>
> drivers/built-in.o: In function `nouveau_pm_fini':
> (.text+0x1c680f): undefined reference to `hwmon_device_unregister'
> drivers/built-in.o: In function `nouveau_hwmon_init':
> nouveau_pm.c:(.text+0x1c6f93): undefined reference to `hwmon_device_register'
> nouveau_pm.c:(.text+0x1c7094): undefined reference to `hwmon_device_unregister
Hi,

I cannot test the attached patch as my kernel forces me to compile hwmon 
(static or module). What kernel version are you using?

As nouveau, radeon doesn't check for CONFIG_HWMON, you may want to ask 
them to do so.

Cheers,

Martin

[-- Attachment #2: 0001-Try-to-fix-issues-when-compiling-nouveau-without-CON.patch --]
[-- Type: text/x-patch, Size: 1607 bytes --]

>From 77aee56418ffbb4f0d4683d9e6d9d8d46ad12621 Mon Sep 17 00:00:00 2001
From: Martin Peres <martin.peres@ensi-bourges.fr>
Date: Tue, 12 Oct 2010 03:30:27 +0200
Subject: [PATCH] Try to fix issues when compiling nouveau without CONFIG_HWMON
 Signed-off: Martin Peres <martin.peres@ensi-bourges.fr>

---
 drivers/gpu/drm/nouveau/nouveau_pm.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index 1c99c55..74a7d3a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -27,8 +27,10 @@
 #include "nouveau_drv.h"
 #include "nouveau_pm.h"
 
+#ifdef CONFIG_HWMON
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
+#endif
 
 static int
 nouveau_pm_clock_set(struct drm_device *dev, struct nouveau_pm_level *perflvl,
@@ -406,7 +408,8 @@ nouveau_hwmon_init(struct drm_device *dev)
 
 	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);
@@ -425,6 +428,9 @@ nouveau_hwmon_init(struct drm_device *dev)
 	}
 
 	pm->hwmon = hwmon_dev;
+#else
+	pm->hwmon = NULL;
+#endif
 
 	return 0;
 }
@@ -435,10 +441,12 @@ nouveau_hwmon_fini(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
 	if (pm->hwmon) {
 		sysfs_remove_group(&pm->hwmon->kobj, &hwmon_attrgroup);
 		hwmon_device_unregister(pm->hwmon);
 	}
+#endif
 }
 
 int
-- 
1.7.3.1


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

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

  reply	other threads:[~2010-10-12  1:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11  5:29 linux-next: Tree for October 11 Stephen Rothwell
2010-10-11 16:29 ` linux-next: Tree for October 11 (nouveau) Randy Dunlap
2010-10-12  1:40   ` Martin Peres [this message]
2010-10-11 16:31 ` linux-next: Tree for October 11 (regulator) Randy Dunlap
2010-10-11 16:42 ` linux-next: Tree for October 11 (staging/keucr) Randy Dunlap
2010-10-11 17:25   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CB3BC73.1020706@free.fr \
    --to=martin.peres@free.fr \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.