priv has rcar_snd_info pointer.
having priv and info in same time is verbose.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
}
int rsnd_adg_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv)
{
struct rsnd_adg *adg;
};
static int rsnd_dai_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv)
{
struct snd_soc_dai_driver *drv;
/*
* init each module
*/
- ret = rsnd_gen_probe(pdev, info, priv);
+ ret = rsnd_gen_probe(pdev, priv);
if (ret)
return ret;
- ret = rsnd_ssi_probe(pdev, info, priv);
+ ret = rsnd_ssi_probe(pdev, priv);
if (ret)
return ret;
- ret = rsnd_scu_probe(pdev, info, priv);
+ ret = rsnd_scu_probe(pdev, priv);
if (ret)
return ret;
- ret = rsnd_adg_probe(pdev, info, priv);
+ ret = rsnd_adg_probe(pdev, priv);
if (ret)
return ret;
- ret = rsnd_dai_probe(pdev, info, priv);
+ ret = rsnd_dai_probe(pdev, priv);
if (ret)
return ret;
}
static int rsnd_gen2_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv)
{
struct device *dev = rsnd_priv_to_dev(priv);
}
static int rsnd_gen1_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv)
{
struct device *dev = rsnd_priv_to_dev(priv);
* Gen
*/
int rsnd_gen_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv)
{
struct device *dev = rsnd_priv_to_dev(priv);
ret = -ENODEV;
if (rsnd_is_gen1(priv))
- ret = rsnd_gen1_probe(pdev, info, priv);
+ ret = rsnd_gen1_probe(pdev, priv);
else if (rsnd_is_gen2(priv))
- ret = rsnd_gen2_probe(pdev, info, priv);
+ ret = rsnd_gen2_probe(pdev, priv);
if (ret < 0)
dev_err(dev, "unknown generation R-Car sound device\n");
* R-Car Gen1/Gen2
*/
int rsnd_gen_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv);
void rsnd_gen_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod);
int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate);
int rsnd_adg_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv);
void rsnd_adg_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
};
#define rsnd_priv_to_dev(priv) ((priv)->dev)
+#define rsnd_priv_to_info(priv) ((priv)->info)
#define rsnd_lock(priv, flags) spin_lock_irqsave(&priv->lock, flags)
#define rsnd_unlock(priv, flags) spin_unlock_irqrestore(&priv->lock, flags)
* R-Car SCU
*/
int rsnd_scu_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv);
void rsnd_scu_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
* R-Car SSI
*/
int rsnd_ssi_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv);
void rsnd_ssi_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
}
int rsnd_scu_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv)
{
+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
struct device *dev = rsnd_priv_to_dev(priv);
struct rsnd_scu *scu;
struct rsnd_mod_ops *ops;
}
int rsnd_ssi_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
struct rsnd_priv *priv)
{
+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
struct rsnd_ssi_platform_info *pinfo;
struct device *dev = rsnd_priv_to_dev(priv);
struct rsnd_mod_ops *ops;