]> git.itanic.dy.fi Git - linux-stable/commit
thermal/drivers/qoriq: Fix getting tmu range
authorPeng Fan <peng.fan@nxp.com>
Mon, 26 Feb 2024 00:36:57 +0000 (08:36 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 11 Mar 2024 16:14:46 +0000 (17:14 +0100)
commit4d0642074c67ed9928e9d68734ace439aa06e403
tree47bb5902e6666f343be8b64b777838ab93aba6fc
parent79d998421d494a68db81f05977d2c22fb06cd627
thermal/drivers/qoriq: Fix getting tmu range

TMU Version 1 has 4 TTRCRs, while TMU Version >=2 has 16 TTRCRs.
So limit the len to 4 will report "invalid range data" for i.MX93.

This patch drop the local array with allocated ttrcr array and
able to support larger tmu ranges.

Fixes: f12d60c81fce ("thermal/drivers/qoriq: Support version 2.1")
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240226003657.3012880-1-peng.fan@oss.nxp.com
drivers/thermal/qoriq_thermal.c