tangled
alpha
login
or
join now
tjh.dev
/
kernel
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
Linus Torvalds
20 years ago
aa7c3a11
5437775e
+5
-22
1 changed file
expand all
collapse all
unified
split
drivers
mmc
wbsd.c
+5
-22
drivers/mmc/wbsd.c
···
1112
1112
}
1113
1113
1114
1114
/*
1115
1115
-
* Helper function for card detection
1116
1116
-
*/
1117
1117
-
static void wbsd_detect_card(unsigned long data)
1118
1118
-
{
1119
1119
-
struct wbsd_host *host = (struct wbsd_host*)data;
1120
1120
-
1121
1121
-
BUG_ON(host == NULL);
1122
1122
-
1123
1123
-
DBG("Executing card detection\n");
1124
1124
-
1125
1125
-
mmc_detect_change(host->mmc, 0);
1126
1126
-
}
1127
1127
-
1128
1128
-
/*
1129
1115
* Tasklets
1130
1116
*/
1131
1117
···
1155
1169
DBG("Card inserted\n");
1156
1170
host->flags |= WBSD_FCARD_PRESENT;
1157
1171
1172
1172
+
spin_unlock(&host->lock);
1173
1173
+
1158
1174
/*
1159
1175
* Delay card detection to allow electrical connections
1160
1176
* to stabilise.
1161
1177
*/
1162
1162
-
mod_timer(&host->detect_timer, jiffies + HZ/2);
1178
1178
+
mmc_detect_change(host->mmc, msecs_to_jiffies(500));
1163
1179
}
1164
1164
-
1165
1165
-
spin_unlock(&host->lock);
1180
1180
+
else
1181
1181
+
spin_unlock(&host->lock);
1166
1182
}
1167
1183
else if (host->flags & WBSD_FCARD_PRESENT)
1168
1184
{
···
1397
1409
/*
1398
1410
* Set up timers
1399
1411
*/
1400
1400
-
init_timer(&host->detect_timer);
1401
1401
-
host->detect_timer.data = (unsigned long)host;
1402
1402
-
host->detect_timer.function = wbsd_detect_card;
1403
1403
-
1404
1412
init_timer(&host->ignore_timer);
1405
1413
host->ignore_timer.data = (unsigned long)host;
1406
1414
host->ignore_timer.function = wbsd_reset_ignore;
···
1438
1454
BUG_ON(host == NULL);
1439
1455
1440
1456
del_timer_sync(&host->ignore_timer);
1441
1441
-
del_timer_sync(&host->detect_timer);
1442
1457
1443
1458
mmc_free_host(mmc);
1444
1459