diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-07-04 17:07:41 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-04 21:28:44 +0200 |
commit | 90eb1ab9e40c2d7596d9160151f6df4b5a71645f (patch) | |
tree | 85ea0b23ffda55d5e0fd58ce58736f47e47a9a23 /sound/soc | |
parent | ASoC: sirf: Add device tree binding for the USP audio device (diff) | |
download | linux-90eb1ab9e40c2d7596d9160151f6df4b5a71645f.tar.xz linux-90eb1ab9e40c2d7596d9160151f6df4b5a71645f.zip |
ASoC: sirf: provide pm-runtime functions when needed
The newly introduced sirf-usp driver defines sirf_usp_pcm_{suspend,resume}
functions only when PM_RUNTIME is enabled, but also uses them when that
is disabled and only PM_SLEEP is turned on, resulting in this error:
../sound/soc/sirf/sirf-usp.c: In function 'sirf_usp_pcm_suspend':
../sound/soc/sirf/sirf-usp.c:308:3: error: implicit declaration of function 'sirf_usp_pcm_runtime_suspend' [-Werror=implicit-function-declaration]
sirf_usp_pcm_runtime_suspend(dev);
^
../sound/soc/sirf/sirf-usp.c: In function 'sirf_usp_pcm_resume':
../sound/soc/sirf/sirf-usp.c:319:3: error: implicit declaration of function 'sirf_usp_pcm_runtime_resume' [-Werror=implicit-function-declaration]
ret = sirf_usp_pcm_runtime_resume(dev);
^
cc1: some warnings being treated as errors
To fix that, this patch changes the #ifdef to CONFIG_PM, which
is enabled when at least one of PM_SLEEP or PM_RUNTIME are enabled.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/sirf/sirf-usp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sirf/sirf-usp.c b/sound/soc/sirf/sirf-usp.c index bdf6aae3e6d0..9693bc2a796d 100644 --- a/sound/soc/sirf/sirf-usp.c +++ b/sound/soc/sirf/sirf-usp.c @@ -282,7 +282,7 @@ static struct snd_soc_dai_driver sirf_usp_pcm_dai = { .ops = &sirf_usp_pcm_dai_ops, }; -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int sirf_usp_pcm_runtime_suspend(struct device *dev) { struct sirf_usp *usp = dev_get_drvdata(dev); |