* [PATCH] ASoC: sirf-audio-codec: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
@ 2014-11-20 20:28 Lars-Peter Clausen
2014-11-21 18:15 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2014-11-20 20:28 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: Rongjun Ying, alsa-devel, Lars-Peter Clausen
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.
While we are at it also replace dev_get_drvdata() with snd_soc_codec_get_drvdata().
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/sirf-audio-codec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sirf-audio-codec.c b/sound/soc/codecs/sirf-audio-codec.c
index 06ba492..07eea20 100644
--- a/sound/soc/codecs/sirf-audio-codec.c
+++ b/sound/soc/codecs/sirf-audio-codec.c
@@ -120,7 +120,8 @@ static int atlas6_codec_enable_and_reset_event(struct snd_soc_dapm_widget *w,
{
#define ATLAS6_CODEC_ENABLE_BITS (1 << 29)
#define ATLAS6_CODEC_RESET_BITS (1 << 28)
- struct sirf_audio_codec *sirf_audio_codec = dev_get_drvdata(w->codec->dev);
+ struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+ struct sirf_audio_codec *sirf_audio_codec = snd_soc_codec_get_drvdata(codec);
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
enable_and_reset_codec(sirf_audio_codec->regmap,
@@ -142,7 +143,8 @@ static int prima2_codec_enable_and_reset_event(struct snd_soc_dapm_widget *w,
{
#define PRIMA2_CODEC_ENABLE_BITS (1 << 27)
#define PRIMA2_CODEC_RESET_BITS (1 << 26)
- struct sirf_audio_codec *sirf_audio_codec = dev_get_drvdata(w->codec->dev);
+ struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+ struct sirf_audio_codec *sirf_audio_codec = snd_soc_codec_get_drvdata(codec);
switch (event) {
case SND_SOC_DAPM_POST_PMU:
enable_and_reset_codec(sirf_audio_codec->regmap,
--
1.8.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: sirf-audio-codec: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
2014-11-20 20:28 [PATCH] ASoC: sirf-audio-codec: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
@ 2014-11-21 18:15 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-11-21 18:15 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Rongjun Ying, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 214 bytes --]
On Thu, Nov 20, 2014 at 09:28:15PM +0100, Lars-Peter Clausen wrote:
> The codec field of the snd_soc_widget struct is eventually going to be
> removed, use snd_soc_dapm_to_codec(w->dapm) instead.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-21 18:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-20 20:28 [PATCH] ASoC: sirf-audio-codec: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
2014-11-21 18:15 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.