drm/nouveau: fix hwmon device binding
authorLucas Stach <dev@lynxeye.de>
Thu, 6 Jan 2011 19:29:53 +0000 (20:29 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 7 Jan 2011 13:22:17 +0000 (23:22 +1000)
Bind the hwmon structs to nouveau device kobj. This makes sure
the hwmon files are created in the device subdir in line with
all other hwmon drivers.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_pm.c

index d93814160bcffc624cf44ffbe3cc2a0eb27b9b3f..fb846a3fef15415100b7a791765b53e3b4e25069 100644 (file)
@@ -422,8 +422,7 @@ nouveau_hwmon_init(struct drm_device *dev)
                return ret;
        }
        dev_set_drvdata(hwmon_dev, dev);
-       ret = sysfs_create_group(&hwmon_dev->kobj,
-                                       &hwmon_attrgroup);
+       ret = sysfs_create_group(&dev->pdev->dev.kobj, &hwmon_attrgroup);
        if (ret) {
                NV_ERROR(dev,
                        "Unable to create hwmon sysfs file: %d\n", ret);