aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLudovic Desroches <ludovic.desroches@atmel.com>2012-05-23 09:52:15 -0400
committerChris Ball <cjb@laptop.org>2012-06-06 05:57:27 -0400
commitb87cc1b5d3a96ef9f1b3a4f8ce7aaff18e96c994 (patch)
tree8987526a74a875536c06a69f93b16aa8cce5ad98
parent09eeff52bf20d485bcafc441f01c142c59c3da16 (diff)
mmc: atmel-mci: fix data timeout issue
The data timeout timer was configured after mmc_add_host call. So, with bad timings, it was possible to have a mmc request causing mod_timer call on a non setup timer. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/atmel-mci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 420aca642b14..456c077455cb 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -2314,6 +2314,8 @@ static int __init atmci_probe(struct platform_device *pdev)
2314 2314
2315 platform_set_drvdata(pdev, host); 2315 platform_set_drvdata(pdev, host);
2316 2316
2317 setup_timer(&host->timer, atmci_timeout_timer, (unsigned long)host);
2318
2317 /* We need at least one slot to succeed */ 2319 /* We need at least one slot to succeed */
2318 nr_slots = 0; 2320 nr_slots = 0;
2319 ret = -ENODEV; 2321 ret = -ENODEV;
@@ -2352,8 +2354,6 @@ static int __init atmci_probe(struct platform_device *pdev)
2352 } 2354 }
2353 } 2355 }
2354 2356
2355 setup_timer(&host->timer, atmci_timeout_timer, (unsigned long)host);
2356
2357 dev_info(&pdev->dev, 2357 dev_info(&pdev->dev,
2358 "Atmel MCI controller at 0x%08lx irq %d, %u slots\n", 2358 "Atmel MCI controller at 0x%08lx irq %d, %u slots\n",
2359 host->mapbase, irq, nr_slots); 2359 host->mapbase, irq, nr_slots);