mfd: rtsx: Optimize card detect flow
authorWei WANG <wei_wang@realsil.com.cn>
Tue, 29 Jan 2013 07:21:37 +0000 (15:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Mar 2013 18:26:35 +0000 (11:26 -0700)
commitd233157ab0476cb80e6fb73817a6979597d759e4
treeb3054dd41f378dc18f3dd6ccc07980858433e398
parentff8b1fdc4aefc77d12f776b967aea8e2e0143949
mfd: rtsx: Optimize card detect flow

commit 504decc0a063e6a09a1e5b203ca68bc21dfffde9 upstream.

1. Schedule card detect work at the end of the ISR
2. Callback function ops->cd_deglitch may delay for a period of time.
It is not proper to call this callback when local irq disabled.
3. Card detect flow can't be executed in parallel with other card reader
operations, so it's better to be protected by mutex.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Cc: Tim Gardner <rtg.canonical@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/rtsx_pcr.c