diff options
author | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-05-24 12:33:26 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-08 23:14:57 -0700 |
commit | 4ee267bbbd58bdcf9dc84ebc01a34ff68b5de3ed (patch) | |
tree | 152b7bd878df8ecf3c15b415f532ec50911b88b1 | |
parent | 38ec4b47d1f474f6da8b5249fd631312b1bf61a9 (diff) |
hwmon: (ibmaem) Initialize sysfs attributes
commit 3cdb2052a6e365ad56202874e6a8a05a2bb336fc upstream.
Initialize dynamically allocated sysfs attributes before device_create_file()
call to suppress lockdep_init_map() warning if lockdep debugging is enabled.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/hwmon/ibmaem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c index bc6e2ab3a361..affc17e21317 100644 --- a/drivers/hwmon/ibmaem.c +++ b/drivers/hwmon/ibmaem.c @@ -947,6 +947,7 @@ static int aem_register_sensors(struct aem_data *data, /* Set up read-only sensors */ while (ro->label) { + sysfs_attr_init(&sensors->dev_attr.attr); sensors->dev_attr.attr.name = ro->label; sensors->dev_attr.attr.mode = S_IRUGO; sensors->dev_attr.show = ro->show; @@ -963,6 +964,7 @@ static int aem_register_sensors(struct aem_data *data, /* Set up read-write sensors */ while (rw->label) { + sysfs_attr_init(&sensors->dev_attr.attr); sensors->dev_attr.attr.name = rw->label; sensors->dev_attr.attr.mode = S_IRUGO | S_IWUSR; sensors->dev_attr.show = rw->show; |