From: Lucas Stach <dev@lynxeye.de>
Date: Sun, 30 Jan 2011 09:54:11 +0000 (+0100)
Subject: drm/nouveau: correctly pair hwmon_init and hwmon_fini
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8c06a3e02062a9beb71a9444c49fb0fbcaa1eed3;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

drm/nouveau: correctly pair hwmon_init and hwmon_fini

I broke this with my commit
07cfe0e7a820ecad078c04e9c2a102521709145d

This fixes fdo #33434

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
---

diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index fb846a3fef15..f05c0cddfeca 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -443,7 +443,7 @@ nouveau_hwmon_fini(struct drm_device *dev)
 	struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
 
 	if (pm->hwmon) {
-		sysfs_remove_group(&pm->hwmon->kobj, &hwmon_attrgroup);
+		sysfs_remove_group(&dev->pdev->dev.kobj, &hwmon_attrgroup);
 		hwmon_device_unregister(pm->hwmon);
 	}
 #endif