projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/wm8750', 'asoc/topic...
[cascardo/linux.git]
/
sound
/
soc
/
codecs
/
wm9705.c
diff --git
a/sound/soc/codecs/wm9705.c
b/sound/soc/codecs/wm9705.c
index
3eddb18
..
5cc457e
100644
(file)
--- a/
sound/soc/codecs/wm9705.c
+++ b/
sound/soc/codecs/wm9705.c
@@
-344,23
+344,27
@@
static int wm9705_soc_probe(struct snd_soc_codec *codec)
struct snd_ac97 *ac97;
int ret = 0;
struct snd_ac97 *ac97;
int ret = 0;
- ac97 = snd_soc_
new
_ac97_codec(codec);
+ ac97 = snd_soc_
alloc
_ac97_codec(codec);
if (IS_ERR(ac97)) {
ret = PTR_ERR(ac97);
dev_err(codec->dev, "Failed to register AC97 codec\n");
return ret;
}
if (IS_ERR(ac97)) {
ret = PTR_ERR(ac97);
dev_err(codec->dev, "Failed to register AC97 codec\n");
return ret;
}
- snd_soc_codec_set_drvdata(codec, ac97);
-
ret = wm9705_reset(codec);
if (ret)
ret = wm9705_reset(codec);
if (ret)
- goto reset_err;
+ goto err_put_device;
+
+ ret = device_add(&ac97->dev);
+ if (ret)
+ goto err_put_device;
+
+ snd_soc_codec_set_drvdata(codec, ac97);
return 0;
return 0;
-
reset_err
:
-
snd_soc_free_ac97_codec(ac97
);
+
err_put_device
:
+
put_device(&ac97->dev
);
return ret;
}
return ret;
}