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
}
1113
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
1130
*/
1131
···
1155
DBG("Card inserted\n");
1156
host->flags |= WBSD_FCARD_PRESENT;
1157
0
0
1158
/*
1159
* Delay card detection to allow electrical connections
1160
* to stabilise.
1161
*/
1162
-
mod_timer(&host->detect_timer, jiffies + HZ/2);
1163
}
1164
-
1165
-
spin_unlock(&host->lock);
1166
}
1167
else if (host->flags & WBSD_FCARD_PRESENT)
1168
{
···
1397
/*
1398
* Set up timers
1399
*/
1400
-
init_timer(&host->detect_timer);
1401
-
host->detect_timer.data = (unsigned long)host;
1402
-
host->detect_timer.function = wbsd_detect_card;
1403
-
1404
init_timer(&host->ignore_timer);
1405
host->ignore_timer.data = (unsigned long)host;
1406
host->ignore_timer.function = wbsd_reset_ignore;
···
1438
BUG_ON(host == NULL);
1439
1440
del_timer_sync(&host->ignore_timer);
1441
-
del_timer_sync(&host->detect_timer);
1442
1443
mmc_free_host(mmc);
1444
···
1112
}
1113
1114
/*
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1115
* Tasklets
1116
*/
1117
···
1169
DBG("Card inserted\n");
1170
host->flags |= WBSD_FCARD_PRESENT;
1171
1172
+
spin_unlock(&host->lock);
1173
+
1174
/*
1175
* Delay card detection to allow electrical connections
1176
* to stabilise.
1177
*/
1178
+
mmc_detect_change(host->mmc, msecs_to_jiffies(500));
1179
}
1180
+
else
1181
+
spin_unlock(&host->lock);
1182
}
1183
else if (host->flags & WBSD_FCARD_PRESENT)
1184
{
···
1409
/*
1410
* Set up timers
1411
*/
0
0
0
0
1412
init_timer(&host->ignore_timer);
1413
host->ignore_timer.data = (unsigned long)host;
1414
host->ignore_timer.function = wbsd_reset_ignore;
···
1454
BUG_ON(host == NULL);
1455
1456
del_timer_sync(&host->ignore_timer);
0
1457
1458
mmc_free_host(mmc);
1459