ASoC: rsnd: save platform_device instead of device
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 23 May 2014 06:25:30 +0000 (23:25 -0700)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:24:06 +0000 (09:24 +0900)
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>
(cherry picked from commit 9f464f8e076e6fcc8d249e76d84f4fb99c1fecff)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
sound/soc/sh/rcar/core.c
sound/soc/sh/rcar/rsnd.h

index 964463d..7bb9a2e 100644 (file)
@@ -956,7 +956,7 @@ static int rsnd_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       priv->dev       = dev;
+       priv->pdev      = pdev;
        priv->info      = info;
        spin_lock_init(&priv->lock);
 
index 5aa7901..344f941 100644 (file)
@@ -317,7 +317,7 @@ struct rsnd_of_data {
 
 struct rsnd_priv {
 
-       struct device *dev;
+       struct platform_device *pdev;
        struct rcar_snd_info *info;
        spinlock_t lock;
 
@@ -357,7 +357,8 @@ struct rsnd_priv {
        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)