diff options
| author | Xiubo Li <Li.Xiubo@freescale.com> | 2014-01-13 04:08:08 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2014-01-13 12:38:36 -0500 |
| commit | ba194a4de5c81ee200b6af88743b26f7b69aa659 (patch) | |
| tree | 376992e7aae17a282531918d759c251b736d4cb8 | |
| parent | 34787d0a258ebb3686676fb37a9e8717cbdd835a (diff) | |
ASoC: simple-card: use snd_soc_card_set/get_drvdata
Remove asoc_simple_get_card_info macro and use snd_soc_card_set_drvdata
and snd_soc_card_get_drvdata instead.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
| -rw-r--r-- | sound/soc/generic/simple-card.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 11030a63b811..5528dd6a4e4e 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c | |||
| @@ -14,9 +14,6 @@ | |||
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <sound/simple_card.h> | 15 | #include <sound/simple_card.h> |
| 16 | 16 | ||
| 17 | #define asoc_simple_get_card_info(p) \ | ||
| 18 | container_of(p->dai_link, struct asoc_simple_card_info, snd_link) | ||
| 19 | |||
| 20 | static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai, | 17 | static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai, |
| 21 | struct asoc_simple_dai *set, | 18 | struct asoc_simple_dai *set, |
| 22 | unsigned int daifmt) | 19 | unsigned int daifmt) |
| @@ -41,7 +38,8 @@ static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai, | |||
| 41 | 38 | ||
| 42 | static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd) | 39 | static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd) |
| 43 | { | 40 | { |
| 44 | struct asoc_simple_card_info *info = asoc_simple_get_card_info(rtd); | 41 | struct asoc_simple_card_info *info = |
| 42 | snd_soc_card_get_drvdata(rtd->card); | ||
| 45 | struct snd_soc_dai *codec = rtd->codec_dai; | 43 | struct snd_soc_dai *codec = rtd->codec_dai; |
| 46 | struct snd_soc_dai *cpu = rtd->cpu_dai; | 44 | struct snd_soc_dai *cpu = rtd->cpu_dai; |
| 47 | unsigned int daifmt = info->daifmt; | 45 | unsigned int daifmt = info->daifmt; |
| @@ -256,6 +254,8 @@ static int asoc_simple_card_probe(struct platform_device *pdev) | |||
| 256 | cinfo->snd_card.dai_link = &cinfo->snd_link; | 254 | cinfo->snd_card.dai_link = &cinfo->snd_link; |
| 257 | cinfo->snd_card.num_links = 1; | 255 | cinfo->snd_card.num_links = 1; |
| 258 | 256 | ||
| 257 | snd_soc_card_set_drvdata(&cinfo->snd_card, cinfo); | ||
| 258 | |||
| 259 | return devm_snd_soc_register_card(&pdev->dev, &cinfo->snd_card); | 259 | return devm_snd_soc_register_card(&pdev->dev, &cinfo->snd_card); |
| 260 | } | 260 | } |
| 261 | 261 | ||
