The patch titled Subject: iio: adc: qcom-vadc-common: use <linux/units.h> helpers has been added to the -mm tree. Its filename is iio-adc-qcom-vadc-common-use-linux-unitsh-helpers.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/iio-adc-qcom-vadc-common-use-linux-unitsh-helpers.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/iio-adc-qcom-vadc-common-use-linux-unitsh-helpers.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Akinobu Mita <akinobu.mita@xxxxxxxxx> Subject: iio: adc: qcom-vadc-common: use <linux/units.h> helpers This switches the qcom-vadc-common to use milli_kelvin_to_millicelsius() in <linux/units.h>. Link: http://lkml.kernel.org/r/1576386975-7941-13-git-send-email-akinobu.mita@xxxxxxxxx Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> Acked-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> Cc: Hartmut Knaack <knaack.h@xxxxxx> Cc: Lars-Peter Clausen <lars@xxxxxxxxxx> Cc: Peter Meerwald-Stadler <pmeerw@xxxxxxxxxx> Cc: Amit Kucheria <amit.kucheria@xxxxxxxxxxxxx> Cc: Andy Shevchenko <andy@xxxxxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> Cc: Darren Hart <dvhart@xxxxxxxxxxxxx> Cc: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx> Cc: Guenter Roeck <linux@xxxxxxxxxxxx> Cc: Jean Delvare <jdelvare@xxxxxxxx> Cc: Jens Axboe <axboe@xxxxxx> Cc: Johannes Berg <johannes.berg@xxxxxxxxx> Cc: Jonathan Cameron <jic23@xxxxxxxxxx> Cc: Kalle Valo <kvalo@xxxxxxxxxxxxxx> Cc: Keith Busch <kbusch@xxxxxxxxxx> Cc: Luca Coelho <luciano.coelho@xxxxxxxxx> Cc: Sagi Grimberg <sagi@xxxxxxxxxxx> Cc: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> Cc: Sujith Thomas <sujith.thomas@xxxxxxxxx> Cc: Zhang Rui <rui.zhang@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/iio/adc/qcom-vadc-common.c | 6 +++--- drivers/iio/adc/qcom-vadc-common.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) --- a/drivers/iio/adc/qcom-vadc-common.c~iio-adc-qcom-vadc-common-use-linux-unitsh-helpers +++ a/drivers/iio/adc/qcom-vadc-common.c @@ -6,6 +6,7 @@ #include <linux/log2.h> #include <linux/err.h> #include <linux/module.h> +#include <linux/units.h> #include "qcom-vadc-common.h" @@ -236,8 +237,7 @@ static int qcom_vadc_scale_die_temp(cons voltage = 0; } - voltage -= KELVINMIL_CELSIUSMIL; - *result_mdec = voltage; + *result_mdec = milli_kelvin_to_millicelsius(voltage); return 0; } @@ -325,7 +325,7 @@ static int qcom_vadc_scale_hw_calib_die_ { *result_mdec = qcom_vadc_scale_code_voltage_factor(adc_code, prescale, data, 2); - *result_mdec -= KELVINMIL_CELSIUSMIL; + *result_mdec = milli_kelvin_to_millicelsius(*result_mdec); return 0; } --- a/drivers/iio/adc/qcom-vadc-common.h~iio-adc-qcom-vadc-common-use-linux-unitsh-helpers +++ a/drivers/iio/adc/qcom-vadc-common.h @@ -38,7 +38,6 @@ #define VADC_AVG_SAMPLES_MAX 512 #define ADC5_AVG_SAMPLES_MAX 16 -#define KELVINMIL_CELSIUSMIL 273150 #define PMIC5_CHG_TEMP_SCALE_FACTOR 377500 #define PMIC5_SMB_TEMP_CONSTANT 419400 #define PMIC5_SMB_TEMP_SCALE_FACTOR 356 _ Patches currently in -mm which might be from akinobu.mita@xxxxxxxxx are add-helpers-for-kelvin-to-from-celsius-conversion.patch acpi-thermal-switch-to-use-linux-unitsh-helpers.patch platform-x86-asus-wmi-switch-to-use-linux-unitsh-helpers.patch platform-x86-intel_menlow-switch-to-use-linux-unitsh-helpers.patch thermal-int340x-switch-to-use-linux-unitsh-helpers.patch thermal-intel_pch-switch-to-use-linux-unitsh-helpers.patch nvme-hwmon-switch-to-use-linux-unitsh-helpers.patch thermal-remove-kelvin-to-from-celsius-conversion-helpers-from-linux-thermalh.patch iwlegacy-use-linux-unitsh-helpers.patch iwlwifi-use-linux-unitsh-helpers.patch thermal-armada-remove-unused-to_mcelsius-macro.patch iio-adc-qcom-vadc-common-use-linux-unitsh-helpers.patch