mmc: sh_mmcif: switch to completion, fix flags
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Wed, 24 Nov 2010 10:05:12 +0000 (10:05 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 25 Nov 2010 07:26:30 +0000 (16:26 +0900)
commitaa0787a90c70587db6934547bb7687efc30062c7
tree3875077ae94563c77db873381d25bc2214fa2e91
parent2d3e4e7652f1db2de0fe8798a1a9be460ac9057b
mmc: sh_mmcif: switch to completion, fix flags

In sh_mmcif.c an event is used as a completion, switch over. When a
wait_for_completion*_timeout() returns, it suffices to check the remaining
time, setting an additional flag before waking up the waiting task only reduces
the race window, but does not eliminate it. This patch switches the driver to
use a completion to signal an interrupt, the only case, when an interrupt
should not wake up the waiter, is when an automatic CMD12 completes. Also fix
MODULE_ALIAS.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/mmc/host/sh_mmcif.c