mmc: fix a race between card-detect rescan and clock-gate work instances
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Fri, 15 Apr 2011 18:08:19 +0000 (20:08 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 9 May 2011 22:06:39 +0000 (15:06 -0700)
commit3fe962c04818a4634255beb3be9f236d36350543
treea27bbb6047846768cb073650d159a3ac4870a50c
parentf038f4d893e9ef35dd38f1ca01001dfe21c5f8f5
mmc: fix a race between card-detect rescan and clock-gate work instances

commit 26fc8775b51484d8c0a671198639c6d5ae60533e upstream.

Currently there is a race in the MMC core between a card-detect
rescan work and the clock-gating work, scheduled from a command
completion. Fix it by removing the dedicated clock-gating mutex
and using the MMC standard locking mechanism instead.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/mmc/core/host.c
include/linux/mmc/host.h