From patchwork Mon Dec 17 18:56:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 1889281 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 580FD3FCA5 for ; Tue, 18 Dec 2012 00:05:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 13D8DE5CD6 for ; Mon, 17 Dec 2012 16:05:15 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 401 seconds by postgrey-1.32 at gabe; Mon, 17 Dec 2012 11:03:18 PST Received: from mail.active-venture.com (mail.active-venture.com [67.228.131.205]) by gabe.freedesktop.org (Postfix) with ESMTP id 29502E5C85 for ; Mon, 17 Dec 2012 11:03:18 -0800 (PST) Received: (qmail 34603 invoked by uid 399); 17 Dec 2012 18:56:36 -0000 X-Virus-Scan: Scanned by ClamAV 0.97.2 (no viruses); Mon, 17 Dec 2012 12:56:36 -0600 Received: from unknown (HELO localhost) (guenter@roeck-us.net@108.223.40.66) by mail.active-venture.com with ESMTPAM; 17 Dec 2012 18:56:36 -0000 X-Originating-IP: 108.223.40.66 X-Sender: guenter@roeck-us.net From: Guenter Roeck To: David Airlie , Ben Skeggs Subject: [PATCH resend] drm: nouveau: Fix build warning seen if HWMON is undefined Date: Mon, 17 Dec 2012 10:56:29 -0800 Message-Id: <1355770589-26945-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 1.7.9.7 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 17 Dec 2012 16:04:57 -0800 Cc: Guenter Roeck , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 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 Fix: nouveau_pm.c: In function ‘nouveau_hwmon_init’: nouveau_pm.c:703:24: warning: unused variable ‘therm’ [-Wunused-variable] Signed-off-by: Guenter Roeck --- drivers/gpu/drm/nouveau/nouveau_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index 5566172..a701ff5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c @@ -698,10 +698,10 @@ static int nouveau_hwmon_init(struct drm_device *dev) { struct nouveau_pm *pm = nouveau_pm(dev); - struct nouveau_drm *drm = nouveau_drm(dev); - struct nouveau_therm *therm = nouveau_therm(drm->device); #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) + struct nouveau_drm *drm = nouveau_drm(dev); + struct nouveau_therm *therm = nouveau_therm(drm->device); struct device *hwmon_dev; int ret = 0;