ASoC: Samsung: Merge two identical if-else clauses
authorJassi Brar <jaswinder.singh@linaro.org>
Sat, 25 Feb 2012 11:12:34 +0000 (16:42 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 29 Feb 2012 23:37:28 +0000 (23:37 +0000)
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>
sound/soc/samsung/i2s.c

index 87a874dc7a3542d12735d8e9b13a97181e4ab86f..ea5ccaec83fcfe85646a201d7334e9506f5bdf0c 100644 (file)
@@ -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;