[alsa-devel] [PATCH 2/2] ASoC: rsnd: tidyup semantics of rsnd_ssi_record_error()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Fri Nov 13 06:48:34 CET 2015


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

rsnd_ssi_record_error() should recorde error, but it clears error too.
this patch fixes up semantic of rsnd_ssi_record_error that it records
error but doesn't clear error. Otherwise code is confusable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/sh/rcar/ssi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index dd693c0..5b97ae8 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -395,13 +395,9 @@ static u32 rsnd_ssi_record_error(struct rsnd_ssi *ssi)
 	u32 status = rsnd_ssi_status_get(mod);
 
 	/* under/over flow error */
-	if (status & (UIRQ | OIRQ)) {
+	if (status & (UIRQ | OIRQ))
 		ssi->err++;
 
-		/* clear error status */
-		rsnd_ssi_status_clear(mod);
-	}
-
 	return status;
 }
 
@@ -536,6 +532,7 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
 			 rsnd_mod_name(mod), rsnd_mod_id(mod));
 	}
 
+	rsnd_ssi_status_clear(mod);
 rsnd_ssi_interrupt_out:
 	spin_unlock(&priv->lock);
 
-- 
1.9.1



More information about the Alsa-devel mailing list