summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-11-28 18:43:34 -0800
committerMark Brown <broonie@linaro.org>2013-11-29 12:09:54 +0000
commit531eaf491e25ce215bbcf434e23e77f53fc98171 (patch)
treecd749fdc45d2b0ede333f3da1646dfe6bea6aa69 /sound/soc/sh
parent994a9df1e3ea3244e94309e4f893e9a5121116c9 (diff)
downloadlinux-531eaf491e25ce215bbcf434e23e77f53fc98171.tar.bz2
ASoC: rcar: remove rcar_gen_ops
Current rcar driver gen.c is using rcar_gen_ops which was made with the assumption that Gen1 and Gen2 need different behavior. but it was not needed. This patch removes unnecessary complex method. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/rcar/gen.c33
1 files changed, 6 insertions, 27 deletions
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
index 4f2eaa3262d7..a29e36eb1a30 100644
--- a/sound/soc/sh/rcar/gen.c
+++ b/sound/soc/sh/rcar/gen.c
@@ -10,14 +10,6 @@
*/
#include "rsnd.h"
-struct rsnd_gen_ops {
- int (*probe)(struct platform_device *pdev,
- struct rcar_snd_info *info,
- struct rsnd_priv *priv);
- void (*remove)(struct platform_device *pdev,
- struct rsnd_priv *priv);
-};
-
struct rsnd_gen {
void __iomem *base[RSND_BASE_MAX];
@@ -307,16 +299,6 @@ static int rsnd_gen1_probe(struct platform_device *pdev,
}
-static void rsnd_gen1_remove(struct platform_device *pdev,
- struct rsnd_priv *priv)
-{
-}
-
-static struct rsnd_gen_ops rsnd_gen1_ops = {
- .probe = rsnd_gen1_probe,
- .remove = rsnd_gen1_remove,
-};
-
/*
* Gen
*/
@@ -326,6 +308,7 @@ int rsnd_gen_probe(struct platform_device *pdev,
{
struct device *dev = rsnd_priv_to_dev(priv);
struct rsnd_gen *gen;
+ int ret;
gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL);
if (!gen) {
@@ -333,23 +316,19 @@ int rsnd_gen_probe(struct platform_device *pdev,
return -ENOMEM;
}
- if (rsnd_is_gen1(priv))
- gen->ops = &rsnd_gen1_ops;
+ priv->gen = gen;
- if (!gen->ops) {
+ if (rsnd_is_gen1(priv)) {
+ ret = rsnd_gen1_probe(pdev, info, priv);
+ } else {
dev_err(dev, "unknown generation R-Car sound device\n");
return -ENODEV;
}
- priv->gen = gen;
-
- return gen->ops->probe(pdev, info, priv);
+ return ret;
}
void rsnd_gen_remove(struct platform_device *pdev,
struct rsnd_priv *priv)
{
- struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
-
- gen->ops->remove(pdev, priv);
}