mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
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:
parent
22fcbb9e51
commit
4a630f55ec
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user