Searched hist:c2cd821603c216a6a7242b2b4c1a093051e26aaf (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/sound/soc/ |
H A D | soc-pcm.c | diff c2cd821603c216a6a7242b2b4c1a093051e26aaf Mon Feb 17 02:27:48 CST 2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ASoC: soc-pcm: use dai_get_widget() at dpcm_end_walk_at_be()
dpcm_end_walk_at_be() has very duplicate code.
dpcm_end_walk_at_be() { ... if (stream == SNDRV_PCM_STREAM_PLAYBACK) { (1) /* code for Playback */ } else { (2) /* code for Capture */ } }
The difference between Playback (1) and Capture (2) code is pointer only (= "playback_widget" or "caputre_widget"). OTOH, now we already has dai_get_widget() for it. This means we can merge (1) and (2). This patch do it and remove duplicated code.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87eeutboul.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
|