ASoC: tegra: utils: Don't use of_have_populated_dt()
authorStephen Warren <swarren@nvidia.com>
Tue, 10 Apr 2012 19:11:17 +0000 (13:11 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 10 Apr 2012 21:33:19 +0000 (22:33 +0100)
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>
sound/soc/tegra/tegra_asoc_utils.c

index 266189d4ff132555076bce78292bf3e5e9b79447..9515ce58ea022a11f059edd9f7163ca1b95a1a04 100644 (file)
@@ -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");