aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2011-01-22 14:55:39 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-01-23 12:28:50 -0500
commit9d1f8a40ddab65a5cedb69b369ee4c0c6e4acf6b (patch)
tree7ab9582fc96b1d4d5fe5cd67cb8b01a0bfb960be /drivers/hwmon
parent1bae4ce27c9c90344f23c65ea6966c50ffeae2f5 (diff)
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: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/applesmc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index ce0372f0615e..4c0743660e9c 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -1072,6 +1072,7 @@ static int applesmc_create_nodes(struct applesmc_node_group *groups, int num)
1072 node->sda.dev_attr.show = grp->show; 1072 node->sda.dev_attr.show = grp->show;
1073 node->sda.dev_attr.store = grp->store; 1073 node->sda.dev_attr.store = grp->store;
1074 attr = &node->sda.dev_attr.attr; 1074 attr = &node->sda.dev_attr.attr;
1075 sysfs_attr_init(attr);
1075 attr->name = node->name; 1076 attr->name = node->name;
1076 attr->mode = S_IRUGO | (grp->store ? S_IWUSR : 0); 1077 attr->mode = S_IRUGO | (grp->store ? S_IWUSR : 0);
1077 ret = sysfs_create_file(&pdev->dev.kobj, attr); 1078 ret = sysfs_create_file(&pdev->dev.kobj, attr);