Skip to content

Commit 7ca803b

Browse files
author
AngeloGioacchino Del Regno
committed
soc: mediatek: mtk-svs: Append "-thermal" to thermal zone names
The thermal framework registers thermal zones as specified in DT and including the "-thermal" suffix: append that to the driver specified tzone_name to actually match the thermal zone name as registered by the thermal API. Fixes: 2bfbf82 ("soc: mediatek: mtk-svs: Constify runtime-immutable members of svs_bank") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
1 parent 4cece76 commit 7ca803b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/soc/mediatek/mtk-svs.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,6 +1768,7 @@ static int svs_bank_resource_setup(struct svs_platform *svsp)
17681768
const struct svs_bank_pdata *bdata;
17691769
struct svs_bank *svsb;
17701770
struct dev_pm_opp *opp;
1771+
char tz_name_buf[20];
17711772
unsigned long freq;
17721773
int count, ret;
17731774
u32 idx, i;
@@ -1819,10 +1820,12 @@ static int svs_bank_resource_setup(struct svs_platform *svsp)
18191820
}
18201821

18211822
if (!IS_ERR_OR_NULL(bdata->tzone_name)) {
1822-
svsb->tzd = thermal_zone_get_zone_by_name(bdata->tzone_name);
1823+
snprintf(tz_name_buf, ARRAY_SIZE(tz_name_buf),
1824+
"%s-thermal", bdata->tzone_name);
1825+
svsb->tzd = thermal_zone_get_zone_by_name(tz_name_buf);
18231826
if (IS_ERR(svsb->tzd)) {
18241827
dev_err(svsb->dev, "cannot get \"%s\" thermal zone\n",
1825-
bdata->tzone_name);
1828+
tz_name_buf);
18261829
return PTR_ERR(svsb->tzd);
18271830
}
18281831
}

0 commit comments

Comments
 (0)