mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix message outputing when failing to register cpu cooling
@ 2014-12-12 14:14 Eduardo Valentin
  2014-12-12 14:14 ` [PATCH 1/2] thermal: db8500: Do not print error message in the EPROBE_DEFER case Eduardo Valentin
  2014-12-12 14:14 ` [PATCH 2/2] thermal: ti-soc-thermal: " Eduardo Valentin
  0 siblings, 2 replies; 3+ messages in thread
From: Eduardo Valentin @ 2014-12-12 14:14 UTC (permalink / raw)
  To: Linux PM; +Cc: LKML, Eduardo Valentin

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(-)

-- 
2.1.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] thermal: db8500: Do not print error message in the EPROBE_DEFER case
  2014-12-12 14:14 [PATCH 0/2] Fix message outputing when failing to register cpu cooling Eduardo Valentin
@ 2014-12-12 14:14 ` Eduardo Valentin
  2014-12-12 14:14 ` [PATCH 2/2] thermal: ti-soc-thermal: " Eduardo Valentin
  1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Valentin @ 2014-12-12 14:14 UTC (permalink / raw)
  To: Linux PM
  Cc: LKML, Eduardo Valentin, Zhang Rui, Grant Likely, Rob Herring, devicetree

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

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
---
 drivers/thermal/db8500_cpufreq_cooling.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c
index 3cc3dd9..28bbff9 100644
--- a/drivers/thermal/db8500_cpufreq_cooling.c
+++ b/drivers/thermal/db8500_cpufreq_cooling.c
@@ -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);
-- 
2.1.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] thermal: ti-soc-thermal: Do not print error message in the EPROBE_DEFER case
  2014-12-12 14:14 [PATCH 0/2] Fix message outputing when failing to register cpu cooling Eduardo Valentin
  2014-12-12 14:14 ` [PATCH 1/2] thermal: db8500: Do not print error message in the EPROBE_DEFER case Eduardo Valentin
@ 2014-12-12 14:14 ` Eduardo Valentin
  1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Valentin @ 2014-12-12 14:14 UTC (permalink / raw)
  To: Linux PM; +Cc: LKML, Eduardo Valentin, Zhang Rui

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

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
---
 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index 5f07d7e..096fb21 100644
--- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
@@ -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);
 
-- 
2.1.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-12 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-12 14:14 [PATCH 0/2] Fix message outputing when failing to register cpu cooling Eduardo Valentin
2014-12-12 14:14 ` [PATCH 1/2] thermal: db8500: Do not print error message in the EPROBE_DEFER case Eduardo Valentin
2014-12-12 14:14 ` [PATCH 2/2] thermal: ti-soc-thermal: " Eduardo Valentin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®