Skip to content

Commit

Permalink
mmc: atmel-mci: fix data timeout issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ludovic Desroches authored and Chris Ball committed Jun 6, 2012
1 parent 09eeff5 commit b87cc1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/host/atmel-mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2314,6 +2314,8 @@ static int __init atmci_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, host);

setup_timer(&host->timer, atmci_timeout_timer, (unsigned long)host);

/* We need at least one slot to succeed */
nr_slots = 0;
ret = -ENODEV;
Expand Down Expand Up @@ -2352,8 +2354,6 @@ static int __init atmci_probe(struct platform_device *pdev)
}
}

setup_timer(&host->timer, atmci_timeout_timer, (unsigned long)host);

dev_info(&pdev->dev,
"Atmel MCI controller at 0x%08lx irq %d, %u slots\n",
host->mapbase, irq, nr_slots);
Expand Down

0 comments on commit b87cc1b

Please sign in to comment.