From: Jassi Brar <jaswinder.singh@linaro.org>
Date: Sat, 25 Feb 2012 11:12:34 +0000 (+0530)
Subject: ASoC: Samsung: Merge two identical if-else clauses
X-Git-Tag: firefly_0821_release~3680^2~2691^2~52^2~25^2~21
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c90887fe982e46d1b23e151636616d4e4a0077a4;p=firefly-linux-kernel-4.4.55.git

ASoC: Samsung: Merge two identical if-else clauses

Saves two lines and a hell of a lot of embarrassment looking at the code.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 87a874dc7a35..ea5ccaec83fc 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;