summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/occ/common.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2019-04-21 23:18:44 +0200
committerGreg Kroah-Hartman2019-04-21 23:18:44 +0200
commit817de6b85914a3dda72b971c074d4d342965fba0 (patch)
treedf0a4563a04aadb8f8595f72392d66d65797c455 /drivers/hwmon/occ/common.c
parentstaging: kpc2000: add initial set of Daktronics drivers (diff)
parentLinux 5.1-rc6 (diff)
downloadkernel-qcow2-linux-817de6b85914a3dda72b971c074d4d342965fba0.tar.gz
kernel-qcow2-linux-817de6b85914a3dda72b971c074d4d342965fba0.tar.xz
kernel-qcow2-linux-817de6b85914a3dda72b971c074d4d342965fba0.zip
Merge 5.1-rc6 into staging-next
We want the fixes in here as well as this resolves an iio driver merge issue. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwmon/occ/common.c')
-rw-r--r--drivers/hwmon/occ/common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hwmon/occ/common.c b/drivers/hwmon/occ/common.c
index b91a80abf724..4679acb4918e 100644
--- a/drivers/hwmon/occ/common.c
+++ b/drivers/hwmon/occ/common.c
@@ -890,6 +890,8 @@ static int occ_setup_sensor_attrs(struct occ *occ)
s++;
}
}
+
+ s = (sensors->power.num_sensors * 4) + 1;
} else {
for (i = 0; i < sensors->power.num_sensors; ++i) {
s = i + 1;
@@ -918,11 +920,11 @@ static int occ_setup_sensor_attrs(struct occ *occ)
show_power, NULL, 3, i);
attr++;
}
- }
- if (sensors->caps.num_sensors >= 1) {
s = sensors->power.num_sensors + 1;
+ }
+ if (sensors->caps.num_sensors >= 1) {
snprintf(attr->name, sizeof(attr->name), "power%d_label", s);
attr->sensor = OCC_INIT_ATTR(attr->name, 0444, show_caps, NULL,
0, 0);