All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: tegra: utils: Don't use of_have_populated_dt()
@ 2012-04-10 19:11 Stephen Warren
  2012-04-10 21:33 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2012-04-10 19:11 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, Stephen Warren

From: Stephen Warren <swarren@nvidia.com>

Recent list discussions concluded that drivers should not be calling
of_have_populated_dt(), and hence of_have_populated_dt() should not be
exported. Use a different mechanism to detect DT vs. non-DT boot.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 sound/soc/tegra/tegra_asoc_utils.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c
index 266189d..9515ce5 100644
--- a/sound/soc/tegra/tegra_asoc_utils.c
+++ b/sound/soc/tegra/tegra_asoc_utils.c
@@ -119,13 +119,15 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
 
 	data->dev = dev;
 
-	if (!of_have_populated_dt())
-		data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA20;
-	else if (of_machine_is_compatible("nvidia,tegra20"))
+	if (of_machine_is_compatible("nvidia,tegra20"))
 		data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA20;
 	else if (of_machine_is_compatible("nvidia,tegra30"))
 		data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA30;
+	else if (!dev->of_node)
+		/* non-DT is always Tegra20 */
+		data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA20;
 	else
+		/* DT boot, but unknown SoC */
 		return -EINVAL;
 
 	data->clk_pll_a = clk_get_sys(NULL, "pll_a");
-- 
1.7.0.4

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

* Re: [PATCH] ASoC: tegra: utils: Don't use of_have_populated_dt()
  2012-04-10 19:11 [PATCH] ASoC: tegra: utils: Don't use of_have_populated_dt() Stephen Warren
@ 2012-04-10 21:33 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-04-10 21:33 UTC (permalink / raw)
  To: Stephen Warren; +Cc: alsa-devel, Stephen Warren, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 349 bytes --]

On Tue, Apr 10, 2012 at 01:11:17PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> Recent list discussions concluded that drivers should not be calling
> of_have_populated_dt(), and hence of_have_populated_dt() should not be
> exported. Use a different mechanism to detect DT vs. non-DT boot.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2012-04-10 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 19:11 [PATCH] ASoC: tegra: utils: Don't use of_have_populated_dt() Stephen Warren
2012-04-10 21:33 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.