提交 07cfe0e7 编写于 作者: L Lucas Stach 提交者: Ben Skeggs

drm/nouveau: fix hwmon device binding

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: NLucas Stach <dev@lynxeye.de>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 e457acae
...@@ -422,8 +422,7 @@ nouveau_hwmon_init(struct drm_device *dev) ...@@ -422,8 +422,7 @@ nouveau_hwmon_init(struct drm_device *dev)
return ret; return ret;
} }
dev_set_drvdata(hwmon_dev, dev); dev_set_drvdata(hwmon_dev, dev);
ret = sysfs_create_group(&hwmon_dev->kobj, ret = sysfs_create_group(&dev->pdev->dev.kobj, &hwmon_attrgroup);
&hwmon_attrgroup);
if (ret) { if (ret) {
NV_ERROR(dev, NV_ERROR(dev,
"Unable to create hwmon sysfs file: %d\n", ret); "Unable to create hwmon sysfs file: %d\n", ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册