From: Dom Cobley Date: Wed, 15 Jun 2022 13:58:46 +0000 (+0100) Subject: Revert "bcm2711_thermal: Don't clamp temperature at zero" X-Git-Tag: accepted/tizen/unified/20230118.172025~534 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e15cabd09b679ce694b0a5e86092e3669b71862;p=platform%2Fkernel%2Flinux-rpi.git Revert "bcm2711_thermal: Don't clamp temperature at zero" This reverts commit 117678e1119f7fade8ee3bf740c3537eeb41036b. --- diff --git a/drivers/thermal/broadcom/bcm2711_thermal.c b/drivers/thermal/broadcom/bcm2711_thermal.c index 6e2ff71..9f5a1eb 100644 --- a/drivers/thermal/broadcom/bcm2711_thermal.c +++ b/drivers/thermal/broadcom/bcm2711_thermal.c @@ -52,7 +52,7 @@ static int bcm2711_get_temp(void *data, int *temp) /* Convert a HW code to a temperature reading (millidegree celsius) */ t = slope * val + offset; - *temp = t; + *temp = t < 0 ? 0 : t; return 0; }