Skip to contentSkip to conversation

Fix message outputing when failing to register cpu cooling

PATCH New Eduardo Valentin 1 participant 3 messages Dec 12, 2014

Subsystems (2)
lore
Share & tools
lore

Eduardo Valentin

author maintainer
#0 lore raw

cover Fix message outputing when failing to register cpu cooling

Hello,

Similar to the IMX case, other two drivers may require to avoid printing error messages when PROBE DEFER happens.

http://marc.info/?l=linux-pm&m=141833235831158&w=2

This minor series fix them.

Cheers,

Eduardo Valentin (2):
thermal: db8500: Do not print error message in the EPROBE_DEFER case
thermal: ti-soc-thermal: Do not print error message in the
EPROBE_DEFER case

 drivers/thermal/db8500_cpufreq_cooling.c           | 10 ++++++++--
 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 11 ++++++++---
 2 files changed, 16 insertions(+), 5 deletions(-)
Signature · 1 line
2.1.3
author maintainer
#1 lore raw

PATCH 1/2 thermal: db8500: Do not print error message in the EPROBE_DEFER case

Avoid printing the error message in the EPROBE_DEFER case where registering cpu cooling at db8500 thermal driver.

---
 drivers/thermal/db8500_cpufreq_cooling.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/thermal/db8500_cpufreq_cooling.c +8 -2
index 3cc3dd9..28bbff9 100644
@@ -30,8 +30,14 @@ static int db8500_cpufreq_cooling_probe(struct platform_device *pdev)
 
 	cdev = cpufreq_cooling_register(cpu_present_mask);
 	if (IS_ERR(cdev)) {
-		dev_err(&pdev->dev, "Failed to register cooling device\n");
-		return PTR_ERR(cdev);
+		int ret = PTR_ERR(cdev);
+
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev,
+				"Failed to register cooling device %d\n",
+				ret);
+				
+		return ret;
 	}
 
 	platform_set_drvdata(pdev, cdev);
Signature · 1 line
2.1.3
author maintainer
#2 lore raw

PATCH 2/2 thermal: ti-soc-thermal: Do not print error message in the EPROBE_DEFER case

In reply to Eduardo Valentin

Avoid printing the error message in the EPROBE_DEFER case where registering cpu cooling at ti-soc-thermal thermal driver.

---
 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/thermal/ti-soc-thermal/ti-thermal-common.c +8 -3
index 5f07d7e..096fb21 100644
@@ -405,9 +405,14 @@ int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)
 	/* Register cooling device */
 	data->cool_dev = cpufreq_cooling_register(cpu_present_mask);
 	if (IS_ERR(data->cool_dev)) {
-		dev_err(bgp->dev,
-			"Failed to register cpufreq cooling device\n");
-		return PTR_ERR(data->cool_dev);
+		int ret = PTR_ERR(data->cool_dev);
+
+		if (ret != -EPROBE_DEFER)
+			dev_err(bgp->dev,
+				"Failed to register cpu cooling device %d\n",
+				ret);
+
+		return ret;
 	}
 	ti_bandgap_set_sensor_data(bgp, id, data);
 
Signature · 1 line
2.1.3