drm/nouveau: correctly pair hwmon_init and hwmon_fini
authorLucas Stach <dev@lynxeye.de>
Sun, 30 Jan 2011 09:54:11 +0000 (10:54 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 2 Feb 2011 00:17:16 +0000 (10:17 +1000)
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>
drivers/gpu/drm/nouveau/nouveau_pm.c

index fb846a3fef15415100b7a791765b53e3b4e25069..f05c0cddfecab5b96d3ef9eb07ad2ff9c221491e 100644 (file)
@@ -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