From: Guenter Roeck Date: Tue, 1 Jan 2013 11:28:00 +0000 (-0800) Subject: drm: nouveau: Fix build warning seen if HWMON is undefined X-Git-Tag: v3.8-rc3~6^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57cdf82ce578959ec871899ad4461475148009e0;p=profile%2Fivi%2Fkernel-x86-ivi.git drm: nouveau: Fix build warning seen if HWMON is undefined Fix: nouveau_pm.c: In function ‘nouveau_hwmon_init’: nouveau_pm.c:703:24: warning: unused variable ‘therm’ [-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: Randy Dunlap Signed-off-by: Guenter Roeck Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index 5566172774d..a701ff5ffa5 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;