diff options
author | Amit Kucheria <amit.kucheria@linaro.org> | 2018-07-26 16:03:08 +0530 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2018-07-27 15:14:21 -0700 |
commit | e0fe01426c50f54d06b6ff69de2be536ec0a3256 (patch) | |
tree | fe125794aba3028c9767c91aacf542acc3b7c7e4 /drivers/thermal/qcom/tsens-v2.c | |
parent | 191dc74bad60e1462094b2e25321479e7eb17cdc (diff) | |
download | linux-e0fe01426c50f54d06b6ff69de2be536ec0a3256.tar.bz2 |
thermal: tsens: Rename variable
We're actually reading the temperature from the status register. Fix the
variable name to reflect that.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/qcom/tsens-v2.c')
-rw-r--r-- | drivers/thermal/qcom/tsens-v2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c index f40150fd7eae..908e3dcb2d5c 100644 --- a/drivers/thermal/qcom/tsens-v2.c +++ b/drivers/thermal/qcom/tsens-v2.c @@ -16,11 +16,11 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) { struct tsens_sensor *s = &tmdev->sensor[id]; u32 code; - unsigned int sensor_addr; + unsigned int status_reg; int last_temp = 0, last_temp2 = 0, last_temp3 = 0, ret; - sensor_addr = tmdev->tm_offset + STATUS_OFFSET + s->hw_id * 4; - ret = regmap_read(tmdev->map, sensor_addr, &code); + status_reg = tmdev->tm_offset + STATUS_OFFSET + s->hw_id * 4; + ret = regmap_read(tmdev->map, status_reg, &code); if (ret) return ret; last_temp = code & LAST_TEMP_MASK; @@ -28,7 +28,7 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) goto done; /* Try a second time */ - ret = regmap_read(tmdev->map, sensor_addr, &code); + ret = regmap_read(tmdev->map, status_reg, &code); if (ret) return ret; if (code & STATUS_VALID_BIT) { @@ -39,7 +39,7 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) } /* Try a third/last time */ - ret = regmap_read(tmdev->map, sensor_addr, &code); + ret = regmap_read(tmdev->map, status_reg, &code); if (ret) return ret; if (code & STATUS_VALID_BIT) { |