diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-11-28 21:43:34 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-29 07:09:54 -0500 |
commit | 531eaf491e25ce215bbcf434e23e77f53fc98171 (patch) | |
tree | cd749fdc45d2b0ede333f3da1646dfe6bea6aa69 /sound/soc | |
parent | 994a9df1e3ea3244e94309e4f893e9a5121116c9 (diff) |
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')
-rw-r--r-- | sound/soc/sh/rcar/gen.c | 33 |
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 @@ | |||
10 | */ | 10 | */ |
11 | #include "rsnd.h" | 11 | #include "rsnd.h" |
12 | 12 | ||
13 | struct rsnd_gen_ops { | ||
14 | int (*probe)(struct platform_device *pdev, | ||
15 | struct rcar_snd_info *info, | ||
16 | struct rsnd_priv *priv); | ||
17 | void (*remove)(struct platform_device *pdev, | ||
18 | struct rsnd_priv *priv); | ||
19 | }; | ||
20 | |||
21 | struct rsnd_gen { | 13 | struct rsnd_gen { |
22 | void __iomem *base[RSND_BASE_MAX]; | 14 | void __iomem *base[RSND_BASE_MAX]; |
23 | 15 | ||
@@ -307,16 +299,6 @@ static int rsnd_gen1_probe(struct platform_device *pdev, | |||
307 | 299 | ||
308 | } | 300 | } |
309 | 301 | ||
310 | static void rsnd_gen1_remove(struct platform_device *pdev, | ||
311 | struct rsnd_priv *priv) | ||
312 | { | ||
313 | } | ||
314 | |||
315 | static struct rsnd_gen_ops rsnd_gen1_ops = { | ||
316 | .probe = rsnd_gen1_probe, | ||
317 | .remove = rsnd_gen1_remove, | ||
318 | }; | ||
319 | |||
320 | /* | 302 | /* |
321 | * Gen | 303 | * Gen |
322 | */ | 304 | */ |
@@ -326,6 +308,7 @@ int rsnd_gen_probe(struct platform_device *pdev, | |||
326 | { | 308 | { |
327 | struct device *dev = rsnd_priv_to_dev(priv); | 309 | struct device *dev = rsnd_priv_to_dev(priv); |
328 | struct rsnd_gen *gen; | 310 | struct rsnd_gen *gen; |
311 | int ret; | ||
329 | 312 | ||
330 | gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL); | 313 | gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL); |
331 | if (!gen) { | 314 | if (!gen) { |
@@ -333,23 +316,19 @@ int rsnd_gen_probe(struct platform_device *pdev, | |||
333 | return -ENOMEM; | 316 | return -ENOMEM; |
334 | } | 317 | } |
335 | 318 | ||
336 | if (rsnd_is_gen1(priv)) | 319 | priv->gen = gen; |
337 | gen->ops = &rsnd_gen1_ops; | ||
338 | 320 | ||
339 | if (!gen->ops) { | 321 | if (rsnd_is_gen1(priv)) { |
322 | ret = rsnd_gen1_probe(pdev, info, priv); | ||
323 | } else { | ||
340 | dev_err(dev, "unknown generation R-Car sound device\n"); | 324 | dev_err(dev, "unknown generation R-Car sound device\n"); |
341 | return -ENODEV; | 325 | return -ENODEV; |
342 | } | 326 | } |
343 | 327 | ||
344 | priv->gen = gen; | 328 | return ret; |
345 | |||
346 | return gen->ops->probe(pdev, info, priv); | ||
347 | } | 329 | } |
348 | 330 | ||
349 | void rsnd_gen_remove(struct platform_device *pdev, | 331 | void rsnd_gen_remove(struct platform_device *pdev, |
350 | struct rsnd_priv *priv) | 332 | struct rsnd_priv *priv) |
351 | { | 333 | { |
352 | struct rsnd_gen *gen = rsnd_priv_to_gen(priv); | ||
353 | |||
354 | gen->ops->remove(pdev, priv); | ||
355 | } | 334 | } |