DT DMA support needs struct platform_device pointer,
and it can get struct device pointer from platform_device.
Save platform_device instead of device.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
return -ENODEV;
}
- priv->dev = dev;
+ priv->pdev = pdev;
priv->info = info;
spin_lock_init(&priv->lock);
struct rsnd_priv {
- struct device *dev;
+ struct platform_device *pdev;
struct rcar_snd_info *info;
spinlock_t lock;
int rdai_nr;
};
-#define rsnd_priv_to_dev(priv) ((priv)->dev)
+#define rsnd_priv_to_pdev(priv) ((priv)->pdev)
+#define rsnd_priv_to_dev(priv) (&(rsnd_priv_to_pdev(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)