linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Eduardo Valentin <eduardo.valentin@ti.com>
Cc: Zhang Rui <rui.zhang@intel.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: [PATCH 1/2] thermal: TI: remove TI_THERMAL dependency on CPU_THERMAL
Date: Fri, 04 Oct 2013 14:39:43 +0200	[thread overview]
Message-ID: <1412622.ASunnW5zzY@amdc1032> (raw)

Cover cpufreq_get_current_driver() call in ti-thermal-common.c with
CPU_FREQ ifdefs and remove no longer needed CPU_THERMAL dependency
from TI_THERMAL config option (stubs for other cpufreq functions for
CPU_THERMAL=n case are already available).

Please note that this enables TI_THERMAL config option in the final
config derived from omap2plus_defconfig (which enables CPU_THERMAL
config option but without CPU_FREQ one so TI_THERMAL config option
was not enabled previously in the final config).

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/thermal/ti-soc-thermal/Kconfig             | 1 -
 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/ti-soc-thermal/Kconfig b/drivers/thermal/ti-soc-thermal/Kconfig
index bd4c7be..bf5d6e4 100644
--- a/drivers/thermal/ti-soc-thermal/Kconfig
+++ b/drivers/thermal/ti-soc-thermal/Kconfig
@@ -13,7 +13,6 @@ config TI_SOC_THERMAL
 config TI_THERMAL
 	bool "Texas Instruments SoCs thermal framework support"
 	depends on TI_SOC_THERMAL
-	depends on CPU_THERMAL
 	help
 	  If you say yes here you want to get support for generic thermal
 	  framework for the Texas Instruments on die bandgap temperature sensor.
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index 4f8b9af..94d91af 100644
--- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
@@ -357,10 +357,12 @@ int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)
 	if (!data)
 		return -EINVAL;
 
+#ifdef CONFIG_CPU_FREQ
 	if (!cpufreq_get_current_driver()) {
 		dev_dbg(bgp->dev, "no cpufreq driver yet\n");
 		return -EPROBE_DEFER;
 	}
+#endif
 
 	/* Register cooling device */
 	data->cool_dev = cpufreq_cooling_register(cpu_present_mask);
-- 
1.8.2.3



             reply	other threads:[~2013-10-04 12:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-04 12:39 Bartlomiej Zolnierkiewicz [this message]
2013-10-04 16:38 ` [PATCH 1/2] thermal: TI: remove TI_THERMAL dependency on CPU_THERMAL Eduardo Valentin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412622.ASunnW5zzY@amdc1032 \
    --to=b.zolnierkie@samsung.com \
    --cc=eduardo.valentin@ti.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).