diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-03-17 19:29:55 -0700 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-21 18:14:56 +0000 |
commit | 90e8e50fce3585d6f9902701de08389b027dadc6 (patch) | |
tree | 67971cdae1de6d546e530d05ba3964f553cf9c24 /sound/soc/sh/rcar/gen.c | |
parent | ba9c949f797aa3af56303445812a452144c61c35 (diff) | |
download | op-kernel-dev-90e8e50fce3585d6f9902701de08389b027dadc6.zip op-kernel-dev-90e8e50fce3585d6f9902701de08389b027dadc6.tar.gz |
ASoC: rsnd: add DeviceTree support
Support for loading the Renesas R-Car sound driver via DeviceTree.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh/rcar/gen.c')
-rw-r--r-- | sound/soc/sh/rcar/gen.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c index 9094970..50a1ef3 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c @@ -359,13 +359,28 @@ static int rsnd_gen1_probe(struct platform_device *pdev, /* * Gen */ +static void rsnd_of_parse_gen(struct platform_device *pdev, + const struct rsnd_of_data *of_data, + struct rsnd_priv *priv) +{ + struct rcar_snd_info *info = priv->info; + + if (!of_data) + return; + + info->flags = of_data->flags; +} + int rsnd_gen_probe(struct platform_device *pdev, + const struct rsnd_of_data *of_data, struct rsnd_priv *priv) { struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_gen *gen; int ret; + rsnd_of_parse_gen(pdev, of_data, priv); + gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL); if (!gen) { dev_err(dev, "GEN allocate failed\n"); |