提交 d473327f 编写于 作者: L Lin Ruizhe 提交者: Daniel Lezcano

thermal/drivers/ti-soc-thermal/bandgap Remove unused variable 'val'

The function ti_bandgap_restore_ctxt() restores the context at resume
time. It checks if the sensor has a counter, reads the register but
does nothing with the value.

The block was probably omitted by the commit b87ea759.

Remove the unused variable as well as the block using it as we can
consider it as dead code.
Reported-by: NHulk Robot <hulkci@huawei.com>
Fixes: b87ea759 ("staging: omap-thermal: fix context restore function")
Signed-off-by: NLin Ruizhe <linruizhe@huawei.com>
Reviewed-by: NTony Lindgren <tony@atomide.com>
Tested-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210421084256.57591-1-linruizhe@huawei.com
上级 bd5d5536
...@@ -1142,14 +1142,10 @@ static int ti_bandgap_restore_ctxt(struct ti_bandgap *bgp) ...@@ -1142,14 +1142,10 @@ static int ti_bandgap_restore_ctxt(struct ti_bandgap *bgp)
for (i = 0; i < bgp->conf->sensor_count; i++) { for (i = 0; i < bgp->conf->sensor_count; i++) {
struct temp_sensor_registers *tsr; struct temp_sensor_registers *tsr;
struct temp_sensor_regval *rval; struct temp_sensor_regval *rval;
u32 val = 0;
rval = &bgp->regval[i]; rval = &bgp->regval[i];
tsr = bgp->conf->sensors[i].registers; tsr = bgp->conf->sensors[i].registers;
if (TI_BANDGAP_HAS(bgp, COUNTER))
val = ti_bandgap_readl(bgp, tsr->bgap_counter);
if (TI_BANDGAP_HAS(bgp, TSHUT_CONFIG)) if (TI_BANDGAP_HAS(bgp, TSHUT_CONFIG))
ti_bandgap_writel(bgp, rval->tshut_threshold, ti_bandgap_writel(bgp, rval->tshut_threshold,
tsr->tshut_threshold); tsr->tshut_threshold);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册