Skip to content

Commit

Permalink
ASoC: rsnd: remove rsnd_src_non_ops
Browse files Browse the repository at this point in the history
Renesas sound driver is supporting Gen1/Gen2.
SRC probe can return error if it was unknown
generation.
Now, rsnd_src_non_ops is not needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed May 26, 2014
1 parent 9f464f8 commit 033e7ed
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions sound/soc/sh/rcar/src.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,6 @@ static int rsnd_src_stop(struct rsnd_mod *mod,
return 0;
}

static struct rsnd_mod_ops rsnd_src_non_ops = {
.name = "src (non)",
};

/*
* Gen1 functions
*/
Expand Down Expand Up @@ -627,6 +623,16 @@ int rsnd_src_probe(struct platform_device *pdev,
char name[RSND_SRC_NAME_SIZE];
int i, nr;

ops = NULL;
if (rsnd_is_gen1(priv))
ops = &rsnd_src_gen1_ops;
if (rsnd_is_gen2(priv))
ops = &rsnd_src_gen2_ops;
if (!ops) {
dev_err(dev, "unknown Generation\n");
return -EIO;
}

rsnd_of_parse_src(pdev, of_data, priv);

/*
Expand Down Expand Up @@ -655,12 +661,6 @@ int rsnd_src_probe(struct platform_device *pdev,
src->info = &info->src_info[i];
src->clk = clk;

ops = &rsnd_src_non_ops;
if (rsnd_is_gen1(priv))
ops = &rsnd_src_gen1_ops;
if (rsnd_is_gen2(priv))
ops = &rsnd_src_gen2_ops;

rsnd_mod_init(priv, &src->mod, ops, RSND_MOD_SRC, i);

dev_dbg(dev, "SRC%d probed\n", i);
Expand Down

0 comments on commit 033e7ed

Please sign in to comment.