diff options
| author | Hans de Goede <hdegoede@redhat.com> | 2015-03-21 10:02:55 -0400 |
|---|---|---|
| committer | Eduardo Valentin <edubezval@gmail.com> | 2015-04-07 16:11:29 -0400 |
| commit | 7e497a7375fe5d5c5d751a71d006f4fd515bbcd8 (patch) | |
| tree | 9c521532a0c0647fe29e10cad1f6bc2abdc5b8d2 | |
| parent | 2771d00081a4e70f52a9b290dae1b68b1bdf41f6 (diff) | |
thermal: Do not log an error if thermal_zone_get_temp returns -EAGAIN
Some temperature sensors only get updated every few seconds and while
waiting for the first irq reporting a (new) temperature to happen there
get_temp operand will return -EAGAIN as it does not have any data to report
yet.
Not logging an error in this case avoids messages like these from showing
up in dmesg on affected systems:
[ 1.219353] thermal thermal_zone0: failed to read out thermal zone 0
[ 2.015433] thermal thermal_zone0: failed to read out thermal zone 0
[ 2.416737] thermal thermal_zone0: failed to read out thermal zone 0
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
| -rw-r--r-- | drivers/thermal/thermal_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 174d3bcf8bd7..4108db7e10c1 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
| @@ -458,8 +458,10 @@ static void update_temperature(struct thermal_zone_device *tz) | |||
| 458 | 458 | ||
| 459 | ret = thermal_zone_get_temp(tz, &temp); | 459 | ret = thermal_zone_get_temp(tz, &temp); |
| 460 | if (ret) { | 460 | if (ret) { |
| 461 | dev_warn(&tz->device, "failed to read out thermal zone %d\n", | 461 | if (ret != -EAGAIN) |
| 462 | tz->id); | 462 | dev_warn(&tz->device, |
| 463 | "failed to read out thermal zone (%d)\n", | ||
| 464 | ret); | ||
| 463 | return; | 465 | return; |
| 464 | } | 466 | } |
| 465 | 467 | ||
