diff options
Diffstat (limited to 'drivers/mmc/wbsd.c')
-rw-r--r-- | drivers/mmc/wbsd.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 46e5f9a17a23..3cbca7cbea80 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
@@ -1136,6 +1136,7 @@ static void wbsd_tasklet_card(unsigned long param) | |||
1136 | { | 1136 | { |
1137 | struct wbsd_host* host = (struct wbsd_host*)param; | 1137 | struct wbsd_host* host = (struct wbsd_host*)param; |
1138 | u8 csr; | 1138 | u8 csr; |
1139 | int delay = -1; | ||
1139 | 1140 | ||
1140 | spin_lock(&host->lock); | 1141 | spin_lock(&host->lock); |
1141 | 1142 | ||
@@ -1155,16 +1156,8 @@ static void wbsd_tasklet_card(unsigned long param) | |||
1155 | DBG("Card inserted\n"); | 1156 | DBG("Card inserted\n"); |
1156 | host->flags |= WBSD_FCARD_PRESENT; | 1157 | host->flags |= WBSD_FCARD_PRESENT; |
1157 | 1158 | ||
1158 | spin_unlock(&host->lock); | 1159 | delay = 500; |
1159 | |||
1160 | /* | ||
1161 | * Delay card detection to allow electrical connections | ||
1162 | * to stabilise. | ||
1163 | */ | ||
1164 | mmc_detect_change(host->mmc, msecs_to_jiffies(500)); | ||
1165 | } | 1160 | } |
1166 | else | ||
1167 | spin_unlock(&host->lock); | ||
1168 | } | 1161 | } |
1169 | else if (host->flags & WBSD_FCARD_PRESENT) | 1162 | else if (host->flags & WBSD_FCARD_PRESENT) |
1170 | { | 1163 | { |
@@ -1181,15 +1174,17 @@ static void wbsd_tasklet_card(unsigned long param) | |||
1181 | tasklet_schedule(&host->finish_tasklet); | 1174 | tasklet_schedule(&host->finish_tasklet); |
1182 | } | 1175 | } |
1183 | 1176 | ||
1184 | /* | 1177 | delay = 0; |
1185 | * Unlock first since we might get a call back. | ||
1186 | */ | ||
1187 | spin_unlock(&host->lock); | ||
1188 | |||
1189 | mmc_detect_change(host->mmc, 0); | ||
1190 | } | 1178 | } |
1191 | else | 1179 | |
1192 | spin_unlock(&host->lock); | 1180 | /* |
1181 | * Unlock first since we might get a call back. | ||
1182 | */ | ||
1183 | |||
1184 | spin_unlock(&host->lock); | ||
1185 | |||
1186 | if (delay != -1) | ||
1187 | mmc_detect_change(host->mmc, msecs_to_jiffies(delay)); | ||
1193 | } | 1188 | } |
1194 | 1189 | ||
1195 | static void wbsd_tasklet_fifo(unsigned long param) | 1190 | static void wbsd_tasklet_fifo(unsigned long param) |