mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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>
This commit is contained in:
parent
62172f4a75
commit
c90887fe98
1 changed files with 4 additions and 6 deletions
|
@ -761,15 +761,13 @@ static int i2s_trigger(struct snd_pcm_substream *substream,
|
||||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
|
|
||||||
if (capture)
|
if (capture) {
|
||||||
i2s_rxctrl(i2s, 0);
|
i2s_rxctrl(i2s, 0);
|
||||||
else
|
|
||||||
i2s_txctrl(i2s, 0);
|
|
||||||
|
|
||||||
if (capture)
|
|
||||||
i2s_fifo(i2s, FIC_RXFLUSH);
|
i2s_fifo(i2s, FIC_RXFLUSH);
|
||||||
else
|
} else {
|
||||||
|
i2s_txctrl(i2s, 0);
|
||||||
i2s_fifo(i2s, FIC_TXFLUSH);
|
i2s_fifo(i2s, FIC_TXFLUSH);
|
||||||
|
}
|
||||||
|
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue