From d64e57cef0436833cfc9620e350ec6f5b041c9a9 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Fri, 28 Jan 2011 14:26:40 -0700 Subject: ASoC: Tegra: utils: Don't use global variables Instead, have the machine driver provide storage for the utility data somehow. For Harmony in particular, store this within struct tegra_harmony, itself referenced by snd_soc_card's drvdata. Signed-off-by: Stephen Warren Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/tegra/tegra_asoc_utils.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'sound/soc/tegra/tegra_asoc_utils.h') diff --git a/sound/soc/tegra/tegra_asoc_utils.h b/sound/soc/tegra/tegra_asoc_utils.h index 855f8f6e44c..bbba7afdfc2 100644 --- a/sound/soc/tegra/tegra_asoc_utils.h +++ b/sound/soc/tegra/tegra_asoc_utils.h @@ -23,9 +23,23 @@ #ifndef __TEGRA_ASOC_UTILS_H__ #define __TEGRA_ASOC_UTILS_H_ -int tegra_asoc_utils_set_rate(int srate, int mclk_rate, int *mclk_change); -int tegra_asoc_utils_init(void); -void tegra_asoc_utils_fini(void); +struct clk; +struct device; + +struct tegra_asoc_utils_data { + struct device *dev; + struct clk *clk_pll_a; + struct clk *clk_pll_a_out0; + struct clk *clk_cdev1; + int set_baseclock; + int set_mclk; +}; + +int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate, + int mclk, int *mclk_change); +int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data, + struct device *dev); +void tegra_asoc_utils_fini(struct tegra_asoc_utils_data *data); #endif -- cgit v1.2.3-70-g09d2