ASoC: rsnd: remove rsnd_get_slot_runtime()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 17 Dec 2015 02:57:07 +0000 (02:57 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 18 Dec 2015 12:10:56 +0000 (12:10 +0000)
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>
sound/soc/sh/rcar/core.c
sound/soc/sh/rcar/rsnd.h

index e59dc8a..7f3a7ed 100644 (file)
@@ -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:
index 4b677e0..e9909a4 100644 (file)
@@ -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);
 
 /*