summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/ad1980.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-07-21 21:53:01 +0200
committerMark Brown <broonie@kernel.org>2015-07-23 17:33:28 +0100
commit7361fbeaeaab5282bbfc88f1f6fe4cf034f7623c (patch)
tree7eb363e1a32f5791aa5ca52f693b097809c159f6 /sound/soc/codecs/ad1980.c
parent5f1d980ee9b6353f18765bfa6774a5a08d6cb944 (diff)
ASoC: ac97: Add support for resetting device before registration
AC97 devices need to be initially reset before they can be used. Currently each driver does this on its own. Add support for resetting the device to core in snd_soc_new_ac97_codec(). If the caller supplies a device ID and device ID mask the function will reset the device and verify that it has the correct ID, if it does not a error is returned. This will allow to remove custom code with similar functionality from individual drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/ad1980.c')
-rw-r--r--sound/soc/codecs/ad1980.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index 3cc69a626454..d9cb81dd64b5 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -240,7 +240,7 @@ static int ad1980_soc_probe(struct snd_soc_codec *codec)
u16 vendor_id2;
u16 ext_status;
- ac97 = snd_soc_new_ac97_codec(codec);
+ ac97 = snd_soc_new_ac97_codec(codec, 0, 0);
if (IS_ERR(ac97)) {
ret = PTR_ERR(ac97);
dev_err(codec->dev, "Failed to register AC97 codec: %d\n", ret);