Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: dapm: Bodge for lack of a widely available clk API

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>

+6
+6
sound/soc/soc-dapm.c
··· 1011 1011 if (!w->clk) 1012 1012 return -EIO; 1013 1013 1014 + #ifdef CONFIG_HAVE_CLK 1014 1015 if (SND_SOC_DAPM_EVENT_ON(event)) { 1015 1016 return clk_enable(w->clk); 1016 1017 } else { 1017 1018 clk_disable(w->clk); 1018 1019 return 0; 1019 1020 } 1021 + #endif 1020 1022 } 1021 1023 EXPORT_SYMBOL_GPL(dapm_clock_event); 1022 1024 ··· 2904 2902 } 2905 2903 break; 2906 2904 case snd_soc_dapm_clock_supply: 2905 + #ifdef CONFIG_HAVE_CLK 2907 2906 w->clk = devm_clk_get(dapm->dev, w->name); 2908 2907 if (IS_ERR(w->clk)) { 2909 2908 ret = PTR_ERR(w->clk); ··· 2912 2909 w->name, ret); 2913 2910 return NULL; 2914 2911 } 2912 + #else 2913 + return NULL; 2914 + #endif 2915 2915 break; 2916 2916 default: 2917 2917 break;