* [PATCH] ASoC: Samsung: Merge two identical if-else clauses
@ 2012-02-25 11:12 Jassi Brar
2012-02-29 23:37 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jassi Brar @ 2012-02-25 11:12 UTC (permalink / raw)
To: alsa-devel; +Cc: sbkim73, Jassi Brar, broonie, lrg
Saves two lines and a hell of a lot of embarrassment looking at the code.
Signed-off-by: Jassi Brar <jaswinder.singh@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: Samsung: Merge two identical if-else clauses
2012-02-25 11:12 [PATCH] ASoC: Samsung: Merge two identical if-else clauses Jassi Brar
@ 2012-02-29 23:37 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-02-29 23:37 UTC (permalink / raw)
To: Jassi Brar; +Cc: sbkim73, alsa-devel, lrg
[-- Attachment #1.1: Type: text/plain, Size: 154 bytes --]
On Sat, Feb 25, 2012 at 04:42:34PM +0530, Jassi Brar wrote:
> Saves two lines and a hell of a lot of embarrassment looking at the code.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-29 23:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-25 11:12 [PATCH] ASoC: Samsung: Merge two identical if-else clauses Jassi Brar
2012-02-29 23:37 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.