diff options
author | Marijn Suijten <marijn.suijten@somainline.org> | 2022-12-16 20:09:45 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-12-28 18:19:46 +0100 |
commit | 04104842736fb29d2e1b5c71dd93f87f428506f0 (patch) | |
tree | fd65063fd4c304b4f541232d2f730726208812e0 /drivers/iio/adc/qcom-spmi-adc5.c | |
parent | iio: imu: kmx61: Fix spelling mistake "Errow" -> "Error" (diff) | |
download | linux-04104842736fb29d2e1b5c71dd93f87f428506f0.tar.xz linux-04104842736fb29d2e1b5c71dd93f87f428506f0.zip |
iio: adc: qcom-spmi-adc5: Suppress probe-deferral error message
Much like 807efb7102e8 ("thermal: qcom-spmi-adc-tm5: suppress
probe-deferral error message") the ADC5 driver also spams a similar
probe-deferral error on startup when a channel is not yet available:
[ 0.343136] qcom-spmi-adc-tm5 1c40000.spmi:pmic@0:adc-tm@3500: get dt data failed: -517
Suppress it by using dev_err_probe instead, which also takes care of
storing the message as reason for deferring.
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Martin Botka <martin.botka@somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20221216190945.902754-1-marijn.suijten@somainline.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/qcom-spmi-adc5.c')
-rw-r--r-- | drivers/iio/adc/qcom-spmi-adc5.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index 821fee60a765..69cc36004b5a 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -894,10 +894,8 @@ static int adc5_probe(struct platform_device *pdev) mutex_init(&adc->lock); ret = adc5_get_fw_data(adc); - if (ret) { - dev_err(dev, "adc get dt data failed\n"); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "adc get dt data failed\n"); irq_eoc = platform_get_irq(pdev, 0); if (irq_eoc < 0) { |