提交 57cdf82c 编写于 作者: G Guenter Roeck 提交者: Dave Airlie

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 <rdunlap@xenotime.net>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 e61e512b
...@@ -698,10 +698,10 @@ static int ...@@ -698,10 +698,10 @@ static int
nouveau_hwmon_init(struct drm_device *dev) nouveau_hwmon_init(struct drm_device *dev)
{ {
struct nouveau_pm *pm = nouveau_pm(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)) #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; struct device *hwmon_dev;
int ret = 0; int ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册