diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-26 12:45:59 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-27 09:48:42 +0100 |
commit | b047e1cce8fe32475ab61846772943a5e4c0a908 (patch) | |
tree | 9d04d8101d161b96f96c2e2e5bd03900011828ec /sound/soc/codecs/ac97.c | |
parent | b49dff8cb61cd4715991612e2eb6905b73a0be78 (diff) | |
download | linux-b047e1cce8fe32475ab61846772943a5e4c0a908.tar.bz2 |
ASoC: ac97: Support multi-platform AC'97
Currently we can only have a single platform built in with AC'97 support
due to the use of a global variable to provide the bus operations. Fix
this by making that variable a pointer and having the bus drivers set the
operations prior to registering.
This is not a particularly good or nice approach but it avoids blocking
multiplatform and a real fix involves fixing the fairly deep problems
with AC'97 support - we should be converting it to a real bus.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/ac97.c')
-rw-r--r-- | sound/soc/codecs/ac97.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index ef2ae32ffc66..ec7351803c24 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -62,13 +62,13 @@ static struct snd_soc_dai_driver ac97_dai = { static unsigned int ac97_read(struct snd_soc_codec *codec, unsigned int reg) { - return soc_ac97_ops.read(codec->ac97, reg); + return soc_ac97_ops->read(codec->ac97, reg); } static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int val) { - soc_ac97_ops.write(codec->ac97, reg, val); + soc_ac97_ops->write(codec->ac97, reg, val); return 0; } @@ -79,7 +79,8 @@ static int ac97_soc_probe(struct snd_soc_codec *codec) int ret; /* add codec as bus device for standard ac97 */ - ret = snd_ac97_bus(codec->card->snd_card, 0, &soc_ac97_ops, NULL, &ac97_bus); + ret = snd_ac97_bus(codec->card->snd_card, 0, soc_ac97_ops, NULL, + &ac97_bus); if (ret < 0) return ret; |