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)
committerChris Ball <cjb@laptop.org>
Wed, 27 Apr 2011 23:16:12 +0000 (19:16 -0400)
commit26fc8775b51484d8c0a671198639c6d5ae60533e
treedf906e9e78fada3739e576ba0546b726de58f585
parentf69475142136c8ad9b9c717aea2ff907aed9f863
mmc: fix a race between card-detect rescan and clock-gate work instances

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>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/host.c
include/linux/mmc/host.h