]> git.baikalelectronics.ru Git - kernel.git/commit
dma/imx-sdma: convernt to use bit ops
authorRichard Zhao <richard.zhao@linaro.org>
Fri, 13 Jan 2012 03:10:01 +0000 (11:10 +0800)
committerVinod Koul <vinod.koul@linux.intel.com>
Tue, 31 Jan 2012 03:33:16 +0000 (09:03 +0530)
commitc0bf13d9e670b3667cc8ea036a02a0aaf2684515
treedd9744524a814b549cd207dd9a10e02f04d2ee32
parentfbe1a39c3e4404e547006a52230c4dd588808172
dma/imx-sdma: convernt to use bit ops

We don't need extra lock, so we use non-atomic bit ops to set/clear bits,

merge event_mask0 and event_mask1 into an array, it helps use bit ops.

It also fixs the issue:

sdmac->event_mask0 = 1 << sdmac->event_id0;
sdmac->event_mask1 = 1 << (sdmac->event_id0 - 32);

It event_id0 < 32, it shifts negative number. If event_id0 >= 32, it
shifts number >= sizeof(int). Both the cases behavior is undefined.

Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/imx-sdma.c