summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-05-22 23:25:30 -0700
committerMark Brown <broonie@linaro.org>2014-05-26 14:34:54 +0100
commit9f464f8e076e6fcc8d249e76d84f4fb99c1fecff (patch)
treec0268b91ad4a93f55e706ad3759062b57e4efc74 /sound/soc
parentf451e48d8e1cae07d55b4a5b558c008cd4dc9a73 (diff)
downloadop-kernel-dev-9f464f8e076e6fcc8d249e76d84f4fb99c1fecff.zip
op-kernel-dev-9f464f8e076e6fcc8d249e76d84f4fb99c1fecff.tar.gz
ASoC: rsnd: save platform_device instead of device
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>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/sh/rcar/core.c2
-rw-r--r--sound/soc/sh/rcar/rsnd.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 1f6981a..073a293 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -957,7 +957,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);
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 5aa7901..344f941 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -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)
OpenPOWER on IntegriCloud