Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53575
b: refs/heads/master
c: 3b91e55
h: refs/heads/master
i:
  53573: 8cf181c
  53571: 11c27e7
  53567: 3011685
v: v3
  • Loading branch information
Pierre Ossman committed May 1, 2007
1 parent 360c989 commit f519e25
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c6a0718f0bfdab0d9b7da5f7b74f38a0058c03a
refs/heads/master: 3b91e5507cddaca53bccf1524ff11a0ac5c85531
15 changes: 14 additions & 1 deletion trunk/drivers/mmc/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,12 @@ static void mmc_setup(struct mmc_host *host)
*/
void mmc_detect_change(struct mmc_host *host, unsigned long delay)
{
#ifdef CONFIG_MMC_DEBUG
mmc_claim_host(host);
BUG_ON(host->removed);
mmc_release_host(host);
#endif

mmc_schedule_delayed_work(&host->detect, delay);
}

Expand Down Expand Up @@ -1690,6 +1696,14 @@ void mmc_remove_host(struct mmc_host *host)
{
struct list_head *l, *n;

#ifdef CONFIG_MMC_DEBUG
mmc_claim_host(host);
host->removed = 1;
mmc_release_host(host);
#endif

mmc_flush_scheduled_work();

list_for_each_safe(l, n, &host->cards) {
struct mmc_card *card = mmc_list_to_card(l);

Expand All @@ -1710,7 +1724,6 @@ EXPORT_SYMBOL(mmc_remove_host);
*/
void mmc_free_host(struct mmc_host *host)
{
mmc_flush_scheduled_work();
mmc_free_host_sysfs(host);
}

Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/mmc/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit f519e25

Please sign in to comment.