Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8690
b: refs/heads/master
c: 210ce2a
h: refs/heads/master
v: v3
  • Loading branch information
Pierre Ossman authored and Russell King committed Sep 12, 2005
1 parent 88f8598 commit 5ee1d37
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 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: e062c8ae85df633f2ecaa5a5af0d9922ced5e074
refs/heads/master: 210ce2a7504e429b7ccc191b1efba4c772c4d8b6
29 changes: 12 additions & 17 deletions trunk/drivers/mmc/wbsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ static void wbsd_tasklet_card(unsigned long param)
{
struct wbsd_host* host = (struct wbsd_host*)param;
u8 csr;
int delay = -1;

spin_lock(&host->lock);

Expand All @@ -1155,16 +1156,8 @@ static void wbsd_tasklet_card(unsigned long param)
DBG("Card inserted\n");
host->flags |= WBSD_FCARD_PRESENT;

spin_unlock(&host->lock);

/*
* Delay card detection to allow electrical connections
* to stabilise.
*/
mmc_detect_change(host->mmc, msecs_to_jiffies(500));
delay = 500;
}
else
spin_unlock(&host->lock);
}
else if (host->flags & WBSD_FCARD_PRESENT)
{
Expand All @@ -1181,15 +1174,17 @@ static void wbsd_tasklet_card(unsigned long param)
tasklet_schedule(&host->finish_tasklet);
}

/*
* Unlock first since we might get a call back.
*/
spin_unlock(&host->lock);

mmc_detect_change(host->mmc, 0);
delay = 0;
}
else
spin_unlock(&host->lock);

/*
* Unlock first since we might get a call back.
*/

spin_unlock(&host->lock);

if (delay != -1)
mmc_detect_change(host->mmc, msecs_to_jiffies(delay));
}

static void wbsd_tasklet_fifo(unsigned long param)
Expand Down

0 comments on commit 5ee1d37

Please sign in to comment.