diff options
| author | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-05-24 15:34:55 -0400 |
|---|---|---|
| committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-06-18 02:22:27 -0400 |
| commit | b1e698db0939b04602ded2a2196ff69c92b49378 (patch) | |
| tree | 41c5ebef11be8f2de95df65bbc56155e17be8c04 | |
| parent | fb794e0f7153918c33f2300986d995524ab711cf (diff) | |
hwmon: (s3c) Initialize sysfs attributes
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>
Cc: stable@kernel.org # 2.6.34+
| -rw-r--r-- | drivers/hwmon/s3c-hwmon.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c index 92b42db43bcf..b39f52e2752a 100644 --- a/drivers/hwmon/s3c-hwmon.c +++ b/drivers/hwmon/s3c-hwmon.c | |||
| @@ -232,6 +232,7 @@ static int s3c_hwmon_create_attr(struct device *dev, | |||
| 232 | 232 | ||
| 233 | attr = &attrs->in; | 233 | attr = &attrs->in; |
| 234 | attr->index = channel; | 234 | attr->index = channel; |
| 235 | sysfs_attr_init(&attr->dev_attr.attr); | ||
| 235 | attr->dev_attr.attr.name = attrs->in_name; | 236 | attr->dev_attr.attr.name = attrs->in_name; |
| 236 | attr->dev_attr.attr.mode = S_IRUGO; | 237 | attr->dev_attr.attr.mode = S_IRUGO; |
| 237 | attr->dev_attr.show = s3c_hwmon_ch_show; | 238 | attr->dev_attr.show = s3c_hwmon_ch_show; |
| @@ -249,6 +250,7 @@ static int s3c_hwmon_create_attr(struct device *dev, | |||
| 249 | 250 | ||
| 250 | attr = &attrs->label; | 251 | attr = &attrs->label; |
| 251 | attr->index = channel; | 252 | attr->index = channel; |
| 253 | sysfs_attr_init(&attr->dev_attr.attr); | ||
| 252 | attr->dev_attr.attr.name = attrs->label_name; | 254 | attr->dev_attr.attr.name = attrs->label_name; |
| 253 | attr->dev_attr.attr.mode = S_IRUGO; | 255 | attr->dev_attr.attr.mode = S_IRUGO; |
| 254 | attr->dev_attr.show = s3c_hwmon_label_show; | 256 | attr->dev_attr.show = s3c_hwmon_label_show; |
