diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-11 12:16:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-11 12:16:03 -0400 |
commit | aa7c3a119a6202b758a669cde9e3829ced64a13f (patch) | |
tree | 95b98197790c8ea491356f42e001d523c929ad53 /drivers | |
parent | 5437775e0bc38d633c0a4b7660812f15b6693b69 (diff) | |
parent | c4a72cbdb39fd559988b16d118f7e5782935ff11 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/wbsd.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index a62c86fef5cc..e11e55dc8924 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
@@ -1112,20 +1112,6 @@ static void wbsd_reset_ignore(unsigned long data) | |||
1112 | } | 1112 | } |
1113 | 1113 | ||
1114 | /* | 1114 | /* |
1115 | * Helper function for card detection | ||
1116 | */ | ||
1117 | static void wbsd_detect_card(unsigned long data) | ||
1118 | { | ||
1119 | struct wbsd_host *host = (struct wbsd_host*)data; | ||
1120 | |||
1121 | BUG_ON(host == NULL); | ||
1122 | |||
1123 | DBG("Executing card detection\n"); | ||
1124 | |||
1125 | mmc_detect_change(host->mmc, 0); | ||
1126 | } | ||
1127 | |||
1128 | /* | ||
1129 | * Tasklets | 1115 | * Tasklets |
1130 | */ | 1116 | */ |
1131 | 1117 | ||
@@ -1169,14 +1155,16 @@ static void wbsd_tasklet_card(unsigned long param) | |||
1169 | DBG("Card inserted\n"); | 1155 | DBG("Card inserted\n"); |
1170 | host->flags |= WBSD_FCARD_PRESENT; | 1156 | host->flags |= WBSD_FCARD_PRESENT; |
1171 | 1157 | ||
1158 | spin_unlock(&host->lock); | ||
1159 | |||
1172 | /* | 1160 | /* |
1173 | * Delay card detection to allow electrical connections | 1161 | * Delay card detection to allow electrical connections |
1174 | * to stabilise. | 1162 | * to stabilise. |
1175 | */ | 1163 | */ |
1176 | mod_timer(&host->detect_timer, jiffies + HZ/2); | 1164 | mmc_detect_change(host->mmc, msecs_to_jiffies(500)); |
1177 | } | 1165 | } |
1178 | 1166 | else | |
1179 | spin_unlock(&host->lock); | 1167 | spin_unlock(&host->lock); |
1180 | } | 1168 | } |
1181 | else if (host->flags & WBSD_FCARD_PRESENT) | 1169 | else if (host->flags & WBSD_FCARD_PRESENT) |
1182 | { | 1170 | { |
@@ -1409,10 +1397,6 @@ static int __devinit wbsd_alloc_mmc(struct device* dev) | |||
1409 | /* | 1397 | /* |
1410 | * Set up timers | 1398 | * Set up timers |
1411 | */ | 1399 | */ |
1412 | init_timer(&host->detect_timer); | ||
1413 | host->detect_timer.data = (unsigned long)host; | ||
1414 | host->detect_timer.function = wbsd_detect_card; | ||
1415 | |||
1416 | init_timer(&host->ignore_timer); | 1400 | init_timer(&host->ignore_timer); |
1417 | host->ignore_timer.data = (unsigned long)host; | 1401 | host->ignore_timer.data = (unsigned long)host; |
1418 | host->ignore_timer.function = wbsd_reset_ignore; | 1402 | host->ignore_timer.function = wbsd_reset_ignore; |
@@ -1454,7 +1438,6 @@ static void __devexit wbsd_free_mmc(struct device* dev) | |||
1454 | BUG_ON(host == NULL); | 1438 | BUG_ON(host == NULL); |
1455 | 1439 | ||
1456 | del_timer_sync(&host->ignore_timer); | 1440 | del_timer_sync(&host->ignore_timer); |
1457 | del_timer_sync(&host->detect_timer); | ||
1458 | 1441 | ||
1459 | mmc_free_host(mmc); | 1442 | mmc_free_host(mmc); |
1460 | 1443 | ||