summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikesh Oswal <noswal@nvidia.com>2011-12-19 10:23:47 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-21 15:06:32 +0530
commitb2d5fe7bd934cc3fb8140c8a7bb486c6ade89e16 (patch)
tree9d69e0bf313b982e11a19b2b964c999bfd15cd81
parentf75b0755bb0abd626effbaf2798ca684062d173d (diff)
asoc: tegra: put the cache init code under macro
put the cache init code under CONFIG_PM macro this fixes the build breaks where CONFIG_PM macro is not defined Change-Id: I0d140d52d80a24298afeefcf4e81b3c6b65d465f Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/70939 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
-rw-r--r--sound/soc/tegra/tegra30_ahub.c7
-rw-r--r--sound/soc/tegra/tegra30_dam.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
index 4af245869f60..3fceda143da8 100644
--- a/sound/soc/tegra/tegra30_ahub.c
+++ b/sound/soc/tegra/tegra30_ahub.c
@@ -483,7 +483,10 @@ int tegra30_ahub_set_tx_cif_channels(enum tegra30_ahub_txcif txcif,
static int __devinit tegra30_ahub_probe(struct platform_device *pdev)
{
struct resource *res0, *res1, *region;
- int ret = 0, i = 0, cache_idx_rsvd;
+ int ret = 0;
+#ifdef CONFIG_PM
+ int i = 0, cache_idx_rsvd;
+#endif
if (ahub)
return -ENODEV;
@@ -556,6 +559,7 @@ static int __devinit tegra30_ahub_probe(struct platform_device *pdev)
goto err_release1;
}
+#ifdef CONFIG_PM
/* cache the POR values of ahub/apbif regs*/
tegra30_ahub_enable_clocks();
@@ -574,6 +578,7 @@ static int __devinit tegra30_ahub_probe(struct platform_device *pdev)
}
tegra30_ahub_disable_clocks();
+#endif
tegra30_ahub_debug_add(ahub);
diff --git a/sound/soc/tegra/tegra30_dam.c b/sound/soc/tegra/tegra30_dam.c
index 430374820b97..2230748c9e73 100644
--- a/sound/soc/tegra/tegra30_dam.c
+++ b/sound/soc/tegra/tegra30_dam.c
@@ -525,7 +525,10 @@ static int __devinit tegra30_dam_probe(struct platform_device *pdev)
{
struct resource *res, *region;
struct tegra30_dam_context *dam;
- int ret = 0, i;
+ int ret = 0;
+#ifdef CONFIG_PM
+ int i;
+#endif
if ((pdev->id < 0) ||
(pdev->id >= TEGRA30_NR_DAM_IFC)) {
@@ -572,6 +575,7 @@ static int __devinit tegra30_dam_probe(struct platform_device *pdev)
goto err_clk_put_dam;
}
+#ifdef CONFIG_PM
/* cache the POR values of DAM regs*/
tegra30_dam_enable_clock(pdev->id);
@@ -585,6 +589,7 @@ static int __devinit tegra30_dam_probe(struct platform_device *pdev)
}
tegra30_dam_disable_clock(pdev->id);
+#endif
platform_set_drvdata(pdev, dam);