diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-01-23 17:55:23 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-01-27 05:30:54 -0500 |
commit | 6627a653bceb3a54e55e5cdc478ec5b8d5c9cc44 (patch) | |
tree | 9a6f157ad1123e4f047689bbf3c4ef88ec1259a4 /sound/soc/codecs/wm8990.c | |
parent | 0db4d0705260dd4bddf1e5a5441c58bdf08bdc9f (diff) |
ASoC: Push the codec runtime storage into the card structure
This is a further stage on the road to refactoring away the ASoC
platform device.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8990.c')
-rw-r--r-- | sound/soc/codecs/wm8990.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index f93c0955ed9d..6af1d399b316 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -1162,7 +1162,7 @@ static int wm8990_hw_params(struct snd_pcm_substream *substream, | |||
1162 | { | 1162 | { |
1163 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 1163 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
1164 | struct snd_soc_device *socdev = rtd->socdev; | 1164 | struct snd_soc_device *socdev = rtd->socdev; |
1165 | struct snd_soc_codec *codec = socdev->codec; | 1165 | struct snd_soc_codec *codec = socdev->card->codec; |
1166 | u16 audio1 = wm8990_read_reg_cache(codec, WM8990_AUDIO_INTERFACE_1); | 1166 | u16 audio1 = wm8990_read_reg_cache(codec, WM8990_AUDIO_INTERFACE_1); |
1167 | 1167 | ||
1168 | audio1 &= ~WM8990_AIF_WL_MASK; | 1168 | audio1 &= ~WM8990_AIF_WL_MASK; |
@@ -1361,7 +1361,7 @@ EXPORT_SYMBOL_GPL(wm8990_dai); | |||
1361 | static int wm8990_suspend(struct platform_device *pdev, pm_message_t state) | 1361 | static int wm8990_suspend(struct platform_device *pdev, pm_message_t state) |
1362 | { | 1362 | { |
1363 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1363 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1364 | struct snd_soc_codec *codec = socdev->codec; | 1364 | struct snd_soc_codec *codec = socdev->card->codec; |
1365 | 1365 | ||
1366 | /* we only need to suspend if we are a valid card */ | 1366 | /* we only need to suspend if we are a valid card */ |
1367 | if (!codec->card) | 1367 | if (!codec->card) |
@@ -1374,7 +1374,7 @@ static int wm8990_suspend(struct platform_device *pdev, pm_message_t state) | |||
1374 | static int wm8990_resume(struct platform_device *pdev) | 1374 | static int wm8990_resume(struct platform_device *pdev) |
1375 | { | 1375 | { |
1376 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1376 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1377 | struct snd_soc_codec *codec = socdev->codec; | 1377 | struct snd_soc_codec *codec = socdev->card->codec; |
1378 | int i; | 1378 | int i; |
1379 | u8 data[2]; | 1379 | u8 data[2]; |
1380 | u16 *cache = codec->reg_cache; | 1380 | u16 *cache = codec->reg_cache; |
@@ -1402,7 +1402,7 @@ static int wm8990_resume(struct platform_device *pdev) | |||
1402 | */ | 1402 | */ |
1403 | static int wm8990_init(struct snd_soc_device *socdev) | 1403 | static int wm8990_init(struct snd_soc_device *socdev) |
1404 | { | 1404 | { |
1405 | struct snd_soc_codec *codec = socdev->codec; | 1405 | struct snd_soc_codec *codec = socdev->card->codec; |
1406 | u16 reg; | 1406 | u16 reg; |
1407 | int ret = 0; | 1407 | int ret = 0; |
1408 | 1408 | ||
@@ -1480,7 +1480,7 @@ static int wm8990_i2c_probe(struct i2c_client *i2c, | |||
1480 | const struct i2c_device_id *id) | 1480 | const struct i2c_device_id *id) |
1481 | { | 1481 | { |
1482 | struct snd_soc_device *socdev = wm8990_socdev; | 1482 | struct snd_soc_device *socdev = wm8990_socdev; |
1483 | struct snd_soc_codec *codec = socdev->codec; | 1483 | struct snd_soc_codec *codec = socdev->card->codec; |
1484 | int ret; | 1484 | int ret; |
1485 | 1485 | ||
1486 | i2c_set_clientdata(i2c, codec); | 1486 | i2c_set_clientdata(i2c, codec); |
@@ -1579,7 +1579,7 @@ static int wm8990_probe(struct platform_device *pdev) | |||
1579 | } | 1579 | } |
1580 | 1580 | ||
1581 | codec->private_data = wm8990; | 1581 | codec->private_data = wm8990; |
1582 | socdev->codec = codec; | 1582 | socdev->card->codec = codec; |
1583 | mutex_init(&codec->mutex); | 1583 | mutex_init(&codec->mutex); |
1584 | INIT_LIST_HEAD(&codec->dapm_widgets); | 1584 | INIT_LIST_HEAD(&codec->dapm_widgets); |
1585 | INIT_LIST_HEAD(&codec->dapm_paths); | 1585 | INIT_LIST_HEAD(&codec->dapm_paths); |
@@ -1605,7 +1605,7 @@ static int wm8990_probe(struct platform_device *pdev) | |||
1605 | static int wm8990_remove(struct platform_device *pdev) | 1605 | static int wm8990_remove(struct platform_device *pdev) |
1606 | { | 1606 | { |
1607 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1607 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1608 | struct snd_soc_codec *codec = socdev->codec; | 1608 | struct snd_soc_codec *codec = socdev->card->codec; |
1609 | 1609 | ||
1610 | if (codec->control_data) | 1610 | if (codec->control_data) |
1611 | wm8990_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1611 | wm8990_set_bias_level(codec, SND_SOC_BIAS_OFF); |