ASoC: fsi: avoid un-necessary status read
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 12 Oct 2010 02:40:14 +0000 (11:40 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 12 Oct 2010 10:02:54 +0000 (11:02 +0100)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/sh/fsi.c

index d68dcbb8dc1fc6217182b3284d5abe3ae533ead7..2b3a50d48ce553c2df9cf63c59bc16f4d8052694 100644 (file)
@@ -572,7 +572,6 @@ static int fsi_fifo_data_ctrl(struct fsi_priv *fsi, int startup, int is_play)
 {
        struct snd_pcm_runtime *runtime;
        struct snd_pcm_substream *substream = NULL;
-       u32 status;
        u32 status_reg = is_play ? DOFF_ST : DIFF_ST;
        int data_residue_num;
        int data_num;
@@ -662,9 +661,9 @@ static int fsi_fifo_data_ctrl(struct fsi_priv *fsi, int startup, int is_play)
        fsi->buff_offset += fsi_num2offset(data_num, ch_width);
 
        /* check fifo status */
-       status = fsi_reg_read(fsi, status_reg);
        if (!startup) {
                struct snd_soc_dai *dai = fsi_get_dai(substream);
+               u32 status = fsi_reg_read(fsi, status_reg);
 
                if (status & ERR_OVER)
                        dev_err(dai->dev, "over run\n");