summaryrefslogtreecommitdiff
path: root/sound/soc/tegra
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-10 13:11:17 -0600
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-10 22:33:19 +0100
commit8127bf5529f6a42d20e9e3613643d149e4dbb697 (patch)
tree64ee6b34253faad9d9015c2b4044948cac8450b5 /sound/soc/tegra
parent20dc24a951f4792070803d8f1838c8ed3f4e5d57 (diff)
ASoC: tegra: utils: Don't use of_have_populated_dt()
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> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r--sound/soc/tegra/tegra_asoc_utils.c8
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 266189d4ff13..9515ce58ea02 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");