Skip to content

Commit

Permalink
ASoC: Support !CONFIG_REGMAP builds
Browse files Browse the repository at this point in the history
Since we changed regmap to be selected and register per bus rather than
via the core only we can't rely on it being enabled by the ASoC core.
Support compiling it out.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reported-by: Axel Lin <axel.lin@gmail.com>
  • Loading branch information
Mark Brown committed Aug 14, 2011
1 parent afe8db5 commit 4835ff9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion sound/soc/soc-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <trace/events/asoc.h>

#ifdef CONFIG_REGMAP
static int hw_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
Expand Down Expand Up @@ -150,4 +151,12 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
return 0;
}
EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io);

#else
int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
int addr_bits, int data_bits,
enum snd_soc_control_type control)
{
return -ENOTSUPP;
}
EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io);
#endif

0 comments on commit 4835ff9

Please sign in to comment.