summaryrefslogtreecommitdiff
path: root/drivers/thermal/qcom/tsens-8960.c
diff options
context:
space:
mode:
authorAmit Kucheria <amit.kucheria@linaro.org>2020-03-12 18:06:59 +0530
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-03-20 12:17:48 +0100
commite604bdd2a7e1087efaaa547644a57fbd8a273da1 (patch)
treea5183d71c44712db3ff5d192e6e892294896ae98 /drivers/thermal/qcom/tsens-8960.c
parent0aef1ee5af9ee9bf8c9267f7b8c10dafc057adf9 (diff)
drivers: thermal: tsens: Pass around struct tsens_sensor as a constant
All the sensor data is initialised at init time. Lock it down by passing it to functions as a constant. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/740f9254484c08d65869df578628eb523c0049ff.1584015867.git.amit.kucheria@linaro.org
Diffstat (limited to 'drivers/thermal/qcom/tsens-8960.c')
-rw-r--r--drivers/thermal/qcom/tsens-8960.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers/thermal/qcom/tsens-8960.c
index a383a57cfbbc..2a28a5af209e 100644
--- a/drivers/thermal/qcom/tsens-8960.c
+++ b/drivers/thermal/qcom/tsens-8960.c
@@ -245,7 +245,7 @@ static inline int code_to_mdegC(u32 adc_code, const struct tsens_sensor *s)
return adc_code * slope + offset;
}
-static int get_temp_8960(struct tsens_sensor *s, int *temp)
+static int get_temp_8960(const struct tsens_sensor *s, int *temp)
{
int ret;
u32 code, trdy;