]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm: nouveau: Fix build warning seen if HWMON is undefined
authorGuenter Roeck <linux@roeck-us.net>
Tue, 1 Jan 2013 11:28:00 +0000 (03:28 -0800)
committerDave Airlie <airlied@redhat.com>
Fri, 4 Jan 2013 06:03:33 +0000 (16:03 +1000)
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 <rdunlap@xenotime.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nouveau_pm.c

index 5566172774df4b2ff891db4745483b8655754a5b..a701ff5ffa5b8fdb63497eac6782523814a2cdf7 100644 (file)
@@ -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;