From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
Simon <horms@verge.net.au>, Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH 3/6] ASoC: rsnd: remove rsnd_src_non_ops
Date: Thu, 22 May 2014 23:25:37 -0700 (PDT) [thread overview]
Message-ID: <87lhttc8ps.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87r43lc8w5.wl%kuninori.morimoto.gx@gmail.com>
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>
---
sound/soc/sh/rcar/src.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index 61009c4..c5ddbcc 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -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
*/
@@ -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);
/*
@@ -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);
--
1.7.9.5
next prev parent reply other threads:[~2014-05-23 6:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 6:21 [PATCH 0/6] ASoC: rsnd: tidyup for DMA support for DT Kuninori Morimoto
2014-05-23 6:24 ` [PATCH 1/6] ASoC: rsnd: DT node clean up by using the of_node_put() Kuninori Morimoto
2014-05-23 6:25 ` [PATCH 2/6] ASoC: rsnd: save platform_device instead of device Kuninori Morimoto
2014-05-23 6:25 ` Kuninori Morimoto [this message]
2014-05-23 6:25 ` [PATCH 4/6] ASoC: rsnd: module name is unified Kuninori Morimoto
2014-05-23 6:25 ` [PATCH 5/6] ASoC: rsnd: care DMA slave channel name for DT Kuninori Morimoto
2014-06-02 21:33 ` Ben Dooks
2014-06-03 0:43 ` Kuninori Morimoto
2014-05-23 6:25 ` [PATCH 6/6] ASoC: rsnd: add rsnd_gen_dma_addr() for DMAC addr Kuninori Morimoto
2014-05-26 13:35 ` [PATCH 0/6] ASoC: rsnd: tidyup for DMA support for DT Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lhttc8ps.wl%kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=horms@verge.net.au \
--cc=lgirdwood@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox