mmc: Flush pending detects on host removal

Make sure we kill of any pending detection runs when the host
is removed instead of when it is freed. Also add some debugging
to make sure the driver doesn't queue up more detection after it
has removed the host.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
Pierre Ossman 2007-02-11 20:43:19 +01:00
parent 1c6a0718f0
commit 3b91e5507c
2 changed files with 17 additions and 1 deletions

View file

@ -147,6 +147,9 @@ struct mmc_host {
struct mmc_card *card_selected; /* the selected MMC card */
struct delayed_work detect;
#ifdef CONFIG_MMC_DEBUG
unsigned int removed:1; /* host is being removed */
#endif
unsigned long private[0] ____cacheline_aligned;
};