aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/mmc.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@hera.kernel.org>2005-09-09 11:19:10 -0400
committerAnton Altaparmakov <aia21@hera.kernel.org>2005-09-09 11:19:10 -0400
commitddcc95963449d028b16d9b9fe50f6e91ce7d9e81 (patch)
treeaaf0392346a18b3e232ddeb5db3c4e917f7ca686 /drivers/mmc/mmc.c
parent223176bc722a7bf519904180e956292ae1d1e819 (diff)
parent5f5024130287a9467a41b9f94ec170958ae45cbd (diff)
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r--drivers/mmc/mmc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 0a117c61cd18..ceae379a4d4c 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1079,13 +1079,17 @@ static void mmc_setup(struct mmc_host *host)
1079/** 1079/**
1080 * mmc_detect_change - process change of state on a MMC socket 1080 * mmc_detect_change - process change of state on a MMC socket
1081 * @host: host which changed state. 1081 * @host: host which changed state.
1082 * @delay: optional delay to wait before detection (jiffies)
1082 * 1083 *
1083 * All we know is that card(s) have been inserted or removed 1084 * All we know is that card(s) have been inserted or removed
1084 * from the socket(s). We don't know which socket or cards. 1085 * from the socket(s). We don't know which socket or cards.
1085 */ 1086 */
1086void mmc_detect_change(struct mmc_host *host) 1087void mmc_detect_change(struct mmc_host *host, unsigned long delay)
1087{ 1088{
1088 schedule_work(&host->detect); 1089 if (delay)
1090 schedule_delayed_work(&host->detect, delay);
1091 else
1092 schedule_work(&host->detect);
1089} 1093}
1090 1094
1091EXPORT_SYMBOL(mmc_detect_change); 1095EXPORT_SYMBOL(mmc_detect_change);
@@ -1189,7 +1193,7 @@ int mmc_add_host(struct mmc_host *host)
1189 ret = mmc_add_host_sysfs(host); 1193 ret = mmc_add_host_sysfs(host);
1190 if (ret == 0) { 1194 if (ret == 0) {
1191 mmc_power_off(host); 1195 mmc_power_off(host);
1192 mmc_detect_change(host); 1196 mmc_detect_change(host, 0);
1193 } 1197 }
1194 1198
1195 return ret; 1199 return ret;
@@ -1259,7 +1263,7 @@ EXPORT_SYMBOL(mmc_suspend_host);
1259 */ 1263 */
1260int mmc_resume_host(struct mmc_host *host) 1264int mmc_resume_host(struct mmc_host *host)
1261{ 1265{
1262 mmc_detect_change(host); 1266 mmc_detect_change(host, 0);
1263 1267
1264 return 0; 1268 return 0;
1265} 1269}