Commit ecba9e72 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: rsnd: unify rdai naming

struct rsnd_dai is called as "rdai",
but its size has been called as "dai_nr".
Unify these as "rdai"
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 98455ed5
...@@ -352,7 +352,7 @@ int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rdai) ...@@ -352,7 +352,7 @@ int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rdai)
{ {
int id = rdai - priv->rdai; int id = rdai - priv->rdai;
if ((id < 0) || (id >= rsnd_dai_nr(priv))) if ((id < 0) || (id >= rsnd_rdai_nr(priv)))
return -EINVAL; return -EINVAL;
return id; return id;
...@@ -360,7 +360,7 @@ int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rdai) ...@@ -360,7 +360,7 @@ int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rdai)
struct rsnd_dai *rsnd_dai_get(struct rsnd_priv *priv, int id) struct rsnd_dai *rsnd_dai_get(struct rsnd_priv *priv, int id)
{ {
if ((id < 0) || (id >= rsnd_dai_nr(priv))) if ((id < 0) || (id >= rsnd_rdai_nr(priv)))
return NULL; return NULL;
return priv->rdai + id; return priv->rdai + id;
...@@ -607,7 +607,7 @@ static int rsnd_dai_probe(struct platform_device *pdev, ...@@ -607,7 +607,7 @@ static int rsnd_dai_probe(struct platform_device *pdev,
return -ENOMEM; return -ENOMEM;
} }
priv->dai_nr = dai_nr; priv->rdai_nr = dai_nr;
priv->daidrv = drv; priv->daidrv = drv;
priv->rdai = rdai; priv->rdai = rdai;
...@@ -802,7 +802,7 @@ static int rsnd_probe(struct platform_device *pdev) ...@@ -802,7 +802,7 @@ static int rsnd_probe(struct platform_device *pdev)
} }
ret = snd_soc_register_component(dev, &rsnd_soc_component, ret = snd_soc_register_component(dev, &rsnd_soc_component,
priv->daidrv, rsnd_dai_nr(priv)); priv->daidrv, rsnd_rdai_nr(priv));
if (ret < 0) { if (ret < 0) {
dev_err(dev, "cannot snd dai register\n"); dev_err(dev, "cannot snd dai register\n");
goto exit_snd_soc; goto exit_snd_soc;
......
...@@ -202,10 +202,10 @@ struct rsnd_dai { ...@@ -202,10 +202,10 @@ struct rsnd_dai {
unsigned int data_alignment:1; unsigned int data_alignment:1;
}; };
#define rsnd_dai_nr(priv) ((priv)->dai_nr) #define rsnd_rdai_nr(priv) ((priv)->rdai_nr)
#define for_each_rsnd_dai(rdai, priv, i) \ #define for_each_rsnd_dai(rdai, priv, i) \
for (i = 0; \ for (i = 0; \
(i < rsnd_dai_nr(priv)) && \ (i < rsnd_rdai_nr(priv)) && \
((rdai) = rsnd_dai_get(priv, i)); \ ((rdai) = rsnd_dai_get(priv, i)); \
i++) i++)
...@@ -299,7 +299,7 @@ struct rsnd_priv { ...@@ -299,7 +299,7 @@ struct rsnd_priv {
*/ */
struct snd_soc_dai_driver *daidrv; struct snd_soc_dai_driver *daidrv;
struct rsnd_dai *rdai; struct rsnd_dai *rdai;
int dai_nr; int rdai_nr;
}; };
#define rsnd_priv_to_dev(priv) ((priv)->dev) #define rsnd_priv_to_dev(priv) ((priv)->dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment