Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal: rockchip: improve the warning log

It is no necessary to print warning agian and again if we don't
add rockchip,grf for dt, otherwise I saw the following log when
doing suspend-2-resume. We only need to print it once when parsing
dt. It looks quite trivial but the log is apparently verbose.

[ 26.615415] PM: early resume of devices complete after 1.539 msecs
[ 26.622002] rk_tsadcv2_initialize: Missing rockchip,grf property
[ 26.629359] rk_gmac-dwmac ff290000.ethernet: init for RGMII
[ 26.639794] PM: resume of devices complete after 18.109 msecs
[ 26.646925] Restarting tasks ... done.

Reviewed-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>

authored by

Shawn Lin and committed by
Zhang Rui
ce62abae 8093a116

+2 -5
+2 -5
drivers/thermal/rockchip_thermal.c
··· 524 524 regs + TSADCV2_AUTO_PERIOD_HT); 525 525 writel_relaxed(TSADCV2_HIGHT_TSHUT_DEBOUNCE_COUNT, 526 526 regs + TSADCV2_HIGHT_TSHUT_DEBOUNCE); 527 - 528 - if (IS_ERR(grf)) { 529 - pr_warn("%s: Missing rockchip,grf property\n", __func__); 530 - return; 531 - } 532 527 } 533 528 534 529 /** ··· 966 971 * need this property. 967 972 */ 968 973 thermal->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf"); 974 + if (IS_ERR(thermal->grf)) 975 + dev_warn(dev, "Missing rockchip,grf property\n"); 969 976 970 977 return 0; 971 978 }