summaryrefslogtreecommitdiffstats
path: root/drivers/mci/mci-core.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-01-18 12:38:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-01-20 10:53:30 +0100
commitc94cd71bb4846310cc6258f668644f3c8dffa698 (patch)
tree1cc420f6ad34bb820b1981891140cbabb90f7ef3 /drivers/mci/mci-core.c
parent1fcdbe3337e5fa059631f16ab41b0016cc86788d (diff)
downloadbarebox-c94cd71bb4846310cc6258f668644f3c8dffa698.tar.gz
barebox-c94cd71bb4846310cc6258f668644f3c8dffa698.tar.xz
mci: Always add probe parameter for cards
Always add the 'probe' parameter to cards so that scripts can rely on the parameter to be present. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/mci-core.c')
-rw-r--r--drivers/mci/mci-core.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 711f74b259..7d43fe3ec3 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1499,34 +1499,18 @@ static int mci_probe(struct device_d *mci_dev)
dev_info(mci->host->hw_dev, "registered as %s\n", dev_name(mci_dev));
-#ifdef CONFIG_MCI_STARTUP
- /* if enabled, probe the attached card immediately */
- rc = mci_card_probe(mci);
- if (rc) {
- /*
- * If it fails, add the 'probe' parameter to give the user
- * a chance to insert a card and try again. Note: This may fail
- * systems that rely on the MCI card for startup (for the
- * persistant environment for example)
- */
- rc = add_mci_parameter(mci_dev);
- if (rc != 0) {
- dev_dbg(mci->mci_dev, "Failed to add 'probe' parameter to the MCI device\n");
- goto on_error;
- }
- }
-#endif
-
-#ifndef CONFIG_MCI_STARTUP
- /* add params on demand */
rc = add_mci_parameter(mci_dev);
if (rc != 0) {
dev_dbg(mci->mci_dev, "Failed to add 'probe' parameter to the MCI device\n");
goto on_error;
}
+
+#ifdef CONFIG_MCI_STARTUP
+ /* if enabled, probe the attached card immediately */
+ mci_card_probe(mci);
#endif
- return rc;
+ return 0;
on_error:
free(mci);