Revert "hwmon-temp-sensor: Support sensor with missing labels"
It turns out this commit results in ignoring the humidity/pressure
sensor for IIO devices that provide both temperature and a different
type.
It happens because the same device has multiple entries in the 'paths'
variable since they are added here:
findFiles(root, R"(in_temp\d*_(input|raw))", paths);
findFiles(root, R"(in_pressure\d*_(input|raw))", paths);
findFiles(root, R"(in_humidityrelative\d*_(input|raw))", paths);
and then this change would remove the config entry for the device before
it could process the other paths.
This reverts commit 0f580944e22534c8814634d76bd752a5d4236f60.
Change-Id: I22b4336101fae7782c650b9cf5f515dbbdacca9e
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/src/HwmonTempMain.cpp b/src/HwmonTempMain.cpp
index 166e407..bdb0ea2 100644
--- a/src/HwmonTempMain.cpp
+++ b/src/HwmonTempMain.cpp
@@ -478,7 +478,10 @@
hwmonName.end());
}
}
- configMap.erase(findSensorCfg);
+ if (hwmonName.empty())
+ {
+ configMap.erase(findSensorCfg);
+ }
}
});
getter->getConfiguration(