提交 9d1f8a40 编写于 作者: H Henrik Rydberg 提交者: Guenter Roeck

hwmon: (applesmc) Properly initialize lockdep attributes

The switch to dynamically allocated sysfs attributes left the
internal lockdep members uninitialized, causing a formal bug.
This patch adds sysfs_attr_init() to the node creation function,
remedying the problem.
Reported-and-tested-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: NHenrik Rydberg <rydberg@euromail.se>
Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
上级 1bae4ce2
......@@ -1072,6 +1072,7 @@ static int applesmc_create_nodes(struct applesmc_node_group *groups, int num)
node->sda.dev_attr.show = grp->show;
node->sda.dev_attr.store = grp->store;
attr = &node->sda.dev_attr.attr;
sysfs_attr_init(attr);
attr->name = node->name;
attr->mode = S_IRUGO | (grp->store ? S_IWUSR : 0);
ret = sysfs_create_file(&pdev->dev.kobj, attr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册