• Russell King's avatar
    thermal: armada: fix legacy validity test sense · 70bb27b7
    Russell King authored
    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: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
    70bb27b7
armada_thermal.c 18.6 KB