diff options
| author | Fabio Estevam <fabio.estevam@nxp.com> | 2018-07-28 15:17:50 -0400 |
|---|---|---|
| committer | Eduardo Valentin <edubezval@gmail.com> | 2018-08-20 14:31:29 -0400 |
| commit | 1a893a5a198eff228ddc1a364830f8928b8f9ac5 (patch) | |
| tree | d5ff3ed83286369576de1f560ad0eb7732c5c456 | |
| parent | f1506a69e3e72196c7c5ce4fd420d5e1a6965ed3 (diff) | |
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>
| -rw-r--r-- | drivers/thermal/qoriq_thermal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c index e32d6ac79145..f807e4d1f72e 100644 --- a/drivers/thermal/qoriq_thermal.c +++ b/drivers/thermal/qoriq_thermal.c | |||
| @@ -197,7 +197,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev) | |||
| 197 | int ret; | 197 | int ret; |
| 198 | struct qoriq_tmu_data *data; | 198 | struct qoriq_tmu_data *data; |
| 199 | struct device_node *np = pdev->dev.of_node; | 199 | struct device_node *np = pdev->dev.of_node; |
| 200 | u32 site = 0; | 200 | u32 site; |
| 201 | 201 | ||
| 202 | if (!np) { | 202 | if (!np) { |
| 203 | dev_err(&pdev->dev, "Device OF-Node is NULL"); | 203 | dev_err(&pdev->dev, "Device OF-Node is NULL"); |
| @@ -244,7 +244,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev) | |||
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | /* Enable monitoring */ | 246 | /* Enable monitoring */ |
| 247 | site |= 0x1 << (15 - data->sensor_id); | 247 | site = 0x1 << (15 - data->sensor_id); |
| 248 | tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr); | 248 | tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr); |
| 249 | 249 | ||
| 250 | return 0; | 250 | return 0; |
