Commit c1fde6e1 authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Daniel Lezcano

thermal: generic-adc: silence "no lookup table" on deferred probe

A "generic-adc-thermal" without "temperature-lookup-table" is perfectly
valid since commit d36e2fa0 ("thermal: generic-adc: make lookup
table optional"). On deferred probe the message "no lookup table,
assuming DAC channel returns milliCelcius" is still logged.
Prevent this message on deferred probe of the IIO channel by first
looking up the IIO channel.
Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200107232044.889075-2-martin.blumenstingl@googlemail.com
parent 0b28594d
...@@ -124,13 +124,6 @@ static int gadc_thermal_probe(struct platform_device *pdev) ...@@ -124,13 +124,6 @@ static int gadc_thermal_probe(struct platform_device *pdev)
if (!gti) if (!gti)
return -ENOMEM; return -ENOMEM;
ret = gadc_thermal_read_linear_lookup_table(&pdev->dev, gti);
if (ret < 0)
return ret;
gti->dev = &pdev->dev;
platform_set_drvdata(pdev, gti);
gti->channel = devm_iio_channel_get(&pdev->dev, "sensor-channel"); gti->channel = devm_iio_channel_get(&pdev->dev, "sensor-channel");
if (IS_ERR(gti->channel)) { if (IS_ERR(gti->channel)) {
ret = PTR_ERR(gti->channel); ret = PTR_ERR(gti->channel);
...@@ -139,6 +132,13 @@ static int gadc_thermal_probe(struct platform_device *pdev) ...@@ -139,6 +132,13 @@ static int gadc_thermal_probe(struct platform_device *pdev)
return ret; return ret;
} }
ret = gadc_thermal_read_linear_lookup_table(&pdev->dev, gti);
if (ret < 0)
return ret;
gti->dev = &pdev->dev;
platform_set_drvdata(pdev, gti);
gti->tz_dev = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, gti, gti->tz_dev = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, gti,
&gadc_thermal_ops); &gadc_thermal_ops);
if (IS_ERR(gti->tz_dev)) { if (IS_ERR(gti->tz_dev)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment