ASoC: davinci-mcasp: Fix XDATA check in mcasp_start_tx
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 11 Dec 2015 11:06:24 +0000 (13:06 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 11 Dec 2015 11:12:28 +0000 (11:12 +0000)
The condition for checking for XDAT being cleared was not correct.

Fixes: 36bcecd0a73eb ("ASoC: davinci-mcasp: Correct TX start sequence")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
sound/soc/davinci/davinci-mcasp.c

index 4495a40a94680600ff324bd035098ff3d73f594b..41235d3867c4568a51ea1d97aaafca5eba1a2dc5 100644 (file)
@@ -223,8 +223,8 @@ static void mcasp_start_tx(struct davinci_mcasp *mcasp)
 
        /* wait for XDATA to be cleared */
        cnt = 0;
-       while (!(mcasp_get_reg(mcasp, DAVINCI_MCASP_TXSTAT_REG) &
-                ~XRDATA) && (cnt < 100000))
+       while ((mcasp_get_reg(mcasp, DAVINCI_MCASP_TXSTAT_REG) & XRDATA) &&
+              (cnt < 100000))
                cnt++;
 
        /* Release TX state machine */