提交 42d040e2 编写于 作者: R Russell King 提交者: Greg Kroah-Hartman

thermal: armada: fix legacy validity test sense

[ Upstream commit 70bb27b79adf63ea39e37371d09c823c7a8f93ce ]

Commit 8c0e64ac ("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: 8c0e64ac ("thermal: armada: get rid of the ->is_valid() pointer")
Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 4c2efd8c
...@@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct thermal_zone_device *thermal, ...@@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct thermal_zone_device *thermal,
int ret; int ret;
/* Valid check */ /* Valid check */
if (armada_is_valid(priv)) { if (!armada_is_valid(priv)) {
dev_err(priv->dev, dev_err(priv->dev,
"Temperature sensor reading not valid\n"); "Temperature sensor reading not valid\n");
return -EIO; return -EIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册