]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: armada: fix legacy validity test sense
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 9 Nov 2018 16:44:14 +0000 (16:44 +0000)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 5 Dec 2018 04:45:14 +0000 (20:45 -0800)
commit7b45055e142461166c281ea6b9d70a0d3ac3a649
tree0cadd59b9944332dc6e157f0f74c358c3468eea0
parentd4b2fd26c6216cdfcb3af25aceb5fab2ea46b12a
thermal: armada: fix legacy validity test sense

Commit caadfc4b3776 ("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: caadfc4b3776 ("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>
drivers/thermal/armada_thermal.c