diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-04-10 04:49:25 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-27 15:57:38 -0400 |
commit | eb2535f542b4279b42518d6a312c6f7290434e55 (patch) | |
tree | 2711b818c9718d123c5ebc11c83cc11eb7ed8120 | |
parent | b787f68c36d49bb1d9236f403813641efa74a031 (diff) |
ASoC: rsnd: add rsnd_dai_to_priv() macro
Using standardized function/macro name is useful in driver
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sh/rcar/core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 9f48d75fa992..a2a0b5768c44 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c | |||
@@ -272,9 +272,10 @@ struct rsnd_dai *rsnd_rdai_get(struct rsnd_priv *priv, int id) | |||
272 | return priv->rdai + id; | 272 | return priv->rdai + id; |
273 | } | 273 | } |
274 | 274 | ||
275 | #define rsnd_dai_to_priv(dai) snd_soc_dai_get_drvdata(dai) | ||
275 | static struct rsnd_dai *rsnd_dai_to_rdai(struct snd_soc_dai *dai) | 276 | static struct rsnd_dai *rsnd_dai_to_rdai(struct snd_soc_dai *dai) |
276 | { | 277 | { |
277 | struct rsnd_priv *priv = snd_soc_dai_get_drvdata(dai); | 278 | struct rsnd_priv *priv = rsnd_dai_to_priv(dai); |
278 | 279 | ||
279 | return rsnd_rdai_get(priv, dai->id); | 280 | return rsnd_rdai_get(priv, dai->id); |
280 | } | 281 | } |
@@ -351,7 +352,7 @@ struct rsnd_dai_stream *rsnd_rdai_to_io(struct rsnd_dai *rdai, | |||
351 | static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd, | 352 | static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd, |
352 | struct snd_soc_dai *dai) | 353 | struct snd_soc_dai *dai) |
353 | { | 354 | { |
354 | struct rsnd_priv *priv = snd_soc_dai_get_drvdata(dai); | 355 | struct rsnd_priv *priv = rsnd_dai_to_priv(dai); |
355 | struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); | 356 | struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); |
356 | struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); | 357 | struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); |
357 | int ssi_id = rsnd_mod_id(rsnd_io_to_mod_ssi(io)); | 358 | int ssi_id = rsnd_mod_id(rsnd_io_to_mod_ssi(io)); |