]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00233577 ASRC: add spinlock to protect ASRC pair resource
authorChen Liangjun <b36089@freescale.com>
Mon, 12 Nov 2012 13:29:32 +0000 (21:29 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:42 +0000 (08:35 +0200)
commit7145c98873e6b1eee7d21916a6da4cdb8c79c67e
tree4272fd449ed07354f1a4052a9aa36e37af447cde
parent63f58d8d1910837c6d3eff256c90ab60bf1fdd77
ENGR00233577 ASRC: add spinlock to protect ASRC pair resource

when quit from ASRC driver with CTRL + C, driver close() would free
output buffer and close clock. However, it is possible that the buffer
is accessed by work task(work task is trigger by interrupt and it would
not be stopped by CTRL + C). So ASRC driver should promise that  its
pair resource(buffer, SDMA channel, and clock) would not be accessed
after it is released.

In this patch, add protect for pair resource.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
drivers/mxc/asrc/mxc_asrc.c