iio: adc: qcom-spmi-adc5-gen3: Fix calls to qcom_adc5_hw_scale()

Currently, calls to qcom_adc5_hw_scale() are passing in a prescale pointer.
The qcom_adc5_hw_scale() function signature asks for the prescale int and
interanally will get the prescale pointer. Fix this.

Change-Id: I4cf630cf47f0b69678b69aecd5058e510bde6b3c
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
This commit is contained in:
Anjelique Melendez 2021-12-17 10:18:39 -08:00 committed by David Collins
parent 22fcbb9e51
commit 4a630f55ec

View File

@ -684,8 +684,7 @@ static void tm_handler_work(struct work_struct *work)
}
} else {
ret = qcom_adc5_hw_scale(chan_prop->scale_fn_type,
&adc5_prescale_ratios[chan_prop->prescale],
adc->data, code, &temp);
chan_prop->prescale, adc->data, code, &temp);
if (ret < 0) {
pr_err("Invalid temperature reading, ret=%d, code=0x%x\n",
@ -739,8 +738,7 @@ static int adc5_gen3_read_raw(struct iio_dev *indio_dev,
return ret;
ret = qcom_adc5_hw_scale(prop->scale_fn_type,
&adc5_prescale_ratios[prop->prescale],
adc->data,
prop->prescale, adc->data,
adc_code_volt, val);
if (ret < 0)
return ret;
@ -793,8 +791,7 @@ int adc_tm_gen3_get_temp(void *data, int *temp)
return ret;
return qcom_adc5_hw_scale(prop->scale_fn_type,
&adc5_prescale_ratios[prop->prescale],
adc->data,
prop->prescale, adc->data,
adc_code_volt, temp);
}