bcm27xx: add support for linux v5.15
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0887-thermal-broadcom-Use-dev_err_probe-to-suppress-defer.patch
1 From dd271e8b291cbb95608f7ed43077a8e4cc0c1a8a Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 6 May 2022 15:34:44 +0100
4 Subject: [PATCH] thermal: broadcom: Use dev_err_probe to suppress
5 defer errors
6
7 It is quite common for the devm_thermal_zone_of_sensor_register
8 to need to defer, so avoid spamming the log by using
9 dev_err_probe instead of dev_err.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 drivers/thermal/broadcom/bcm2711_thermal.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/drivers/thermal/broadcom/bcm2711_thermal.c
17 +++ b/drivers/thermal/broadcom/bcm2711_thermal.c
18 @@ -95,7 +95,7 @@ static int bcm2711_thermal_probe(struct
19 &bcm2711_thermal_of_ops);
20 if (IS_ERR(thermal)) {
21 ret = PTR_ERR(thermal);
22 - dev_err(dev, "could not register sensor: %d\n", ret);
23 + dev_err_probe(dev, ret, "could not register sensor: %d\n", ret);
24 return ret;
25 }
26