Skip to content

Commit

Permalink
ASoC: Samsung: Merge two identical if-else clauses
Browse files Browse the repository at this point in the history
Saves two lines and a hell of a lot of embarrassment looking at the code.

Signed-off-by: Jassi Brar <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
JassiBrar authored and broonie committed Feb 29, 2012
1 parent 62172f4 commit c90887f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sound/soc/samsung/i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c90887f

Please sign in to comment.