From: Guenter Roeck Subject: [PATCH v2/RESEND] drm: nouveau: Fix build warning seen if HWMON is undefined Date: Tue, 1 Jan 2013 03:28:00 -0800 Message-ID: <1357039680-19436-1-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-kernel-owner@vger.kernel.org To: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Guenter Roeck , Dave Airlie , Randy Dunlap List-Id: dri-devel@lists.freedesktop.org =46ix: nouveau_pm.c: In function =E2=80=98nouveau_hwmon_init=E2=80=99: nouveau_pm.c:703:24: warning: unused variable =E2=80=98therm=E2=80=99 [= -Wunused-variable] Introduced by commit 095f979a (drm/nouveau/pm: fix build with HWMON off= ) which fixed a build error but introduced a build warning. Cc: Dave Airlie Cc: Randy Dunlap Signed-off-by: Guenter Roeck --- v2: Improved explanation Added Cc: 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/nou= veau/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 =3D nouveau_pm(dev); - struct nouveau_drm *drm =3D nouveau_drm(dev); - struct nouveau_therm *therm =3D nouveau_therm(drm->device); =20 #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_= MODULE)) + struct nouveau_drm *drm =3D nouveau_drm(dev); + struct nouveau_therm *therm =3D nouveau_therm(drm->device); struct device *hwmon_dev; int ret =3D 0; =20 --=20 1.7.9.7