summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-06-15 06:23:08 +0000
committerMark Brown <broonie@kernel.org>2015-06-16 12:34:02 +0100
commit8bd616c4f7717d8049276acc329bf5bd3988ac3b (patch)
tree73b25d758c88319e0fbf6cdcbc8c2b7906f6a528 /sound
parent1683e1a4135862c9837b768b1e2ab27623f2161a (diff)
downloadlinux-stable-8bd616c4f7717d8049276acc329bf5bd3988ac3b.tar.gz
linux-stable-8bd616c4f7717d8049276acc329bf5bd3988ac3b.tar.bz2
linux-stable-8bd616c4f7717d8049276acc329bf5bd3988ac3b.zip
ASoC: rsnd-card: tidyup rsrc_priv_to_()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sh/rcar/rsrc-card.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c
index 8c74b089eb3c..8162b7d66c4d 100644
--- a/sound/soc/sh/rcar/rsrc-card.c
+++ b/sound/soc/sh/rcar/rsrc-card.c
@@ -68,8 +68,8 @@ struct rsrc_card_priv {
};
#define rsrc_priv_to_dev(priv) ((priv)->snd_card.dev)
-#define rsrc_priv_to_link(priv, i) ((priv)->snd_card.dai_link + i)
-#define rsrc_priv_to_props(priv, i) ((priv)->dai_props + i)
+#define rsrc_priv_to_link(priv, i) ((priv)->snd_card.dai_link + (i))
+#define rsrc_priv_to_props(priv, i) ((priv)->dai_props + (i))
#define rsrc_dev_to_of_data(dev) (of_match_device(rsrc_card_of_match, (dev))->data)
static int rsrc_card_startup(struct snd_pcm_substream *substream)
@@ -77,7 +77,7 @@ static int rsrc_card_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card);
struct rsrc_card_dai_props *dai_props =
- &priv->dai_props[rtd - rtd->card->rtd];
+ rsrc_priv_to_props(priv, rtd - rtd->card->rtd);
int ret;
ret = clk_prepare_enable(dai_props->cpu_dai.clk);
@@ -96,7 +96,7 @@ static void rsrc_card_shutdown(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card);
struct rsrc_card_dai_props *dai_props =
- &priv->dai_props[rtd - rtd->card->rtd];
+ rsrc_priv_to_props(priv, rtd - rtd->card->rtd);
clk_disable_unprepare(dai_props->cpu_dai.clk);