From patchwork Tue Oct 12 01:40:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Peres X-Patchwork-Id: 246651 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9C1f5sf014083 for ; Tue, 12 Oct 2010 01:41:30 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 25BD99EFC0 for ; Mon, 11 Oct 2010 18:41:05 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by gabe.freedesktop.org (Postfix) with ESMTP id C2DDA9E80F for ; Mon, 11 Oct 2010 18:40:40 -0700 (PDT) Received: from [192.168.0.1] (unknown [82.246.199.246]) by smtp4-g21.free.fr (Postfix) with ESMTP id 4443D4C8059 for ; Tue, 12 Oct 2010 03:40:35 +0200 (CEST) Message-ID: <4CB3BC73.1020706@free.fr> Date: Tue, 12 Oct 2010 03:40:03 +0200 From: Martin Peres User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100928 Lanikai/3.1.4 MIME-Version: 1.0 To: dri-devel@lists.freedesktop.org Subject: Re: linux-next: Tree for October 11 (nouveau) References: <20101011162959.86e40961.sfr@canb.auug.org.au> <20101011092915.66afd35b.randy.dunlap@oracle.com> In-Reply-To: <20101011092915.66afd35b.randy.dunlap@oracle.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 12 Oct 2010 01:41:30 +0000 (UTC) From 77aee56418ffbb4f0d4683d9e6d9d8d46ad12621 Mon Sep 17 00:00:00 2001 From: Martin Peres 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 --- 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 #include +#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