[alsa-devel] [PATCH] ASoC: Samsung: Merge two identical if-else clauses
Jassi Brar
jaswinder.singh at linaro.org
Sat Feb 25 12:12:34 CET 2012
Saves two lines and a hell of a lot of embarrassment looking at the code.
Signed-off-by: Jassi Brar <jaswinder.singh at linaro.org>
---
sound/soc/samsung/i2s.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 7ccb075..6553b19 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -761,15 +761,13 @@ static int i2s_trigger(struct snd_pcm_substream *substream,
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
local_irq_save(flags);
- if (capture)
+ if (capture) {
i2s_rxctrl(i2s, 0);
- else
- i2s_txctrl(i2s, 0);
-
- if (capture)
i2s_fifo(i2s, FIC_RXFLUSH);
- else
+ } else {
+ i2s_txctrl(i2s, 0);
i2s_fifo(i2s, FIC_TXFLUSH);
+ }
local_irq_restore(flags);
break;
--
1.7.4.1
More information about the Alsa-devel
mailing list