thermal: qoriq: Simplify the 'site' variable assignment
There is no need to assign zero to the variable 'site' and then perform a compound bitwise OR operation afterwards. Make it simpler by assigning the final 'site' value directly. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
committed by
Eduardo Valentin
parent
f1506a69e3
commit
1a893a5a19
@@ -197,7 +197,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
|
|||||||
int ret;
|
int ret;
|
||||||
struct qoriq_tmu_data *data;
|
struct qoriq_tmu_data *data;
|
||||||
struct device_node *np = pdev->dev.of_node;
|
struct device_node *np = pdev->dev.of_node;
|
||||||
u32 site = 0;
|
u32 site;
|
||||||
|
|
||||||
if (!np) {
|
if (!np) {
|
||||||
dev_err(&pdev->dev, "Device OF-Node is NULL");
|
dev_err(&pdev->dev, "Device OF-Node is NULL");
|
||||||
@@ -244,7 +244,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Enable monitoring */
|
/* Enable monitoring */
|
||||||
site |= 0x1 << (15 - data->sensor_id);
|
site = 0x1 << (15 - data->sensor_id);
|
||||||
tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
|
tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user