From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: [PATCH] drm: nouveau: Fix build warning seen is HWMON is undefined Date: Fri, 5 Oct 2012 08:59:07 -0700 Message-ID: <1349452747-4334-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: David Airlie , Ben Skeggs Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Guenter Roeck 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] Signed-off-by: Guenter Roeck --- This was seen in the latest upstream kernel. 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 0bf64c9..90dc63e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c @@ -699,10 +699,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