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
/
wm9713.c
diff --git
a/sound/soc/codecs/wm9713.c
b/sound/soc/codecs/wm9713.c
index
71b9d5b
..
6822291
100644
(file)
--- a/
sound/soc/codecs/wm9713.c
+++ b/
sound/soc/codecs/wm9713.c
@@
-217,7
+217,7
@@
SOC_SINGLE("3D Depth", AC97_REC_GAIN_MIC, 0, 15, 1),
static int wm9713_voice_shutdown(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
static int wm9713_voice_shutdown(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
- struct snd_soc_codec *codec =
w->codec
;
+ struct snd_soc_codec *codec =
snd_soc_dapm_to_codec(w->dapm)
;
u16 status, rate;
if (WARN_ON(event != SND_SOC_DAPM_PRE_PMD))
u16 status, rate;
if (WARN_ON(event != SND_SOC_DAPM_PRE_PMD))
@@
-1225,7
+1225,7
@@
static int wm9713_soc_probe(struct snd_soc_codec *codec)
struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec);
int ret = 0, reg;
struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec);
int ret = 0, reg;
- wm9713->ac97 = snd_soc_
new
_ac97_codec(codec);
+ wm9713->ac97 = snd_soc_
alloc
_ac97_codec(codec);
if (IS_ERR(wm9713->ac97))
return PTR_ERR(wm9713->ac97);
if (IS_ERR(wm9713->ac97))
return PTR_ERR(wm9713->ac97);
@@
-1234,7
+1234,11
@@
static int wm9713_soc_probe(struct snd_soc_codec *codec)
wm9713_reset(codec, 0);
ret = wm9713_reset(codec, 1);
if (ret < 0)
wm9713_reset(codec, 0);
ret = wm9713_reset(codec, 1);
if (ret < 0)
- goto reset_err;
+ goto err_put_device;
+
+ ret = device_add(&wm9713->ac97->dev);
+ if (ret)
+ goto err_put_device;
/* unmute the adc - move to kcontrol */
reg = ac97_read(codec, AC97_CD) & 0x7fff;
/* unmute the adc - move to kcontrol */
reg = ac97_read(codec, AC97_CD) & 0x7fff;
@@
-1242,8
+1246,8
@@
static int wm9713_soc_probe(struct snd_soc_codec *codec)
return 0;
return 0;
-
reset_err
:
-
snd_soc_free_ac97_codec(wm9713->ac97
);
+
err_put_device
:
+
put_device(&wm9713->ac97->dev
);
return ret;
}
return ret;
}