summaryrefslogtreecommitdiff
path: root/drivers/hwmon/nct6775.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-31 11:24:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-31 11:24:49 -0700
commit30a5f11896a26a345e934e18e9a62c714bc1ceed (patch)
treefbc7dcfbbe31f1a6e793771f329f687dbba2812a /drivers/hwmon/nct6775.c
parentaaa20fc23341be3df7b17810e330f12244abcf29 (diff)
parentc7bd6dc320b85445b6b36a0aff41f929210027c7 (diff)
Merge tag 'hwmon-for-linus-v4.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck: "Some late hwmon patches, all headed for -stable - fix sysfs attribute initialization in nct6775 and nct6683 drivers - do not attempt to auto-detect tmp435 on I2C address 0x37 - ensure iio channel is of type IIO_VOLTAGE in ntc_thermistor driver" * tag 'hwmon-for-linus-v4.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (nct6683) Add missing sysfs attribute initialization hwmon: (nct6775) Add missing sysfs attribute initialization hwmon: (tmp401) Do not auto-detect chip on I2C address 0x37 hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE
Diffstat (limited to 'drivers/hwmon/nct6775.c')
-rw-r--r--drivers/hwmon/nct6775.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
index 4fcb48103299..bd1c99deac71 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/nct6775.c
@@ -995,6 +995,7 @@ nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg,
(*t)->dev_attr.attr.name, tg->base + i);
if ((*t)->s2) {
a2 = &su->u.a2;
+ sysfs_attr_init(&a2->dev_attr.attr);
a2->dev_attr.attr.name = su->name;
a2->nr = (*t)->u.s.nr + i;
a2->index = (*t)->u.s.index;
@@ -1005,6 +1006,7 @@ nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg,
*attrs = &a2->dev_attr.attr;
} else {
a = &su->u.a1;
+ sysfs_attr_init(&a->dev_attr.attr);
a->dev_attr.attr.name = su->name;
a->index = (*t)->u.index + i;
a->dev_attr.attr.mode =