diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2018-11-09 16:44:14 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-21 14:15:22 +0100 |
commit | 42d040e2c7b97ff2ff5c1cb5d097aa6a057d0ba2 (patch) | |
tree | 4013f1f672e2f64007244b10ccc968cebe2b02b5 /drivers/thermal | |
parent | 4c2efd8cf5d9138d83f772bab8f00d5f771c41a7 (diff) | |
download | linux-stable-42d040e2c7b97ff2ff5c1cb5d097aa6a057d0ba2.tar.gz linux-stable-42d040e2c7b97ff2ff5c1cb5d097aa6a057d0ba2.tar.bz2 linux-stable-42d040e2c7b97ff2ff5c1cb5d097aa6a057d0ba2.zip |
thermal: armada: fix legacy validity test sense
[ Upstream commit 70bb27b79adf63ea39e37371d09c823c7a8f93ce ]
Commit 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid()
pointer") removed the unnecessary indirection through a function
pointer, but in doing so, also removed the negation operator too:
- if (priv->data->is_valid && !priv->data->is_valid(priv)) {
+ if (armada_is_valid(priv)) {
which results in:
armada_thermal f06f808c.thermal: Temperature sensor reading not valid
armada_thermal f2400078.thermal: Temperature sensor reading not valid
armada_thermal f4400078.thermal: Temperature sensor reading not valid
at boot, or whenever the "temp" sysfs file is read. Replace the
negation operator.
Fixes: 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/armada_thermal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index 2c2f6d93034e..e16b3cb1808c 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct thermal_zone_device *thermal, int ret; /* Valid check */ - if (armada_is_valid(priv)) { + if (!armada_is_valid(priv)) { dev_err(priv->dev, "Temperature sensor reading not valid\n"); return -EIO; |