summaryrefslogtreecommitdiff
path: root/sound/soc/sh/rcar
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-12-17 02:57:07 +0000
committerMark Brown <broonie@kernel.org>2015-12-18 12:10:56 +0000
commit5858a7d17e266945b9860768d0549aeb6a52d31f (patch)
tree1f181866b155f4eaae41a2e971cdd52365731e1b /sound/soc/sh/rcar
parent49ee73b441f5734c3da254c60e134f343b89911a (diff)
ASoC: rsnd: remove rsnd_get_slot_runtime()
Current Renesas sound driver is using rsnd_get_slot_runtime(), but it is same as runtime->channels. This patch removes rsnd_get_slot_runtime() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar')
-rw-r--r--sound/soc/sh/rcar/core.c19
-rw-r--r--sound/soc/sh/rcar/rsnd.h1
2 files changed, 4 insertions, 16 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index e59dc8a461bb..7f3a7edba096 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -196,21 +196,10 @@ int rsnd_get_slot_rdai(struct rsnd_dai *rdai)
return rdai->slots;
}
-int rsnd_get_slot_runtime(struct rsnd_dai_stream *io)
-{
- struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- int chan = rsnd_get_slot_rdai(rdai);
-
- if (runtime->channels < chan)
- chan = runtime->channels;
-
- return chan;
-}
-
int rsnd_get_slot_extend(struct rsnd_dai_stream *io)
{
- int chan = rsnd_get_slot_runtime(io);
+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
+ int chan = runtime->channels;
/* TDM Extend Mode needs 8ch */
if (chan == 6)
@@ -243,9 +232,9 @@ u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
u32 rsnd_get_adinr_chan(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
{
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
- u32 chan = rsnd_get_slot_rdai(rdai);
+ u32 chan = runtime->channels;
switch (chan) {
case 1:
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 4b677e074c7a..e9909a4ce754 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -294,7 +294,6 @@ void rsnd_mod_interrupt(struct rsnd_mod *mod,
struct rsnd_dai_stream *io));
int rsnd_get_slot_rdai(struct rsnd_dai *rdai);
-int rsnd_get_slot_runtime(struct rsnd_dai_stream *io);
int rsnd_get_slot_extend(struct rsnd_dai_stream *io);
/*