mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
ac4b9dbb3c
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> SVN-Revision: 39782
46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
From 73797537f3904fec60a647b3b209bf7add092ad5 Mon Sep 17 00:00:00 2001
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
Date: Mon, 17 Feb 2014 21:59:08 +0100
|
|
Subject: [PATCH] sunxi-mmc: Don't call mmc_of_parse until we're ready to
|
|
|
|
mmc_of_parse registers an irq handler for the gpio pins for cd, this irq
|
|
handler will reference host->ops, so don't call mmc_of_parse until we're
|
|
done setting everything up.
|
|
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
---
|
|
drivers/mmc/host/sunxi-mmc.c | 9 ++++-----
|
|
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
|
|
index d5e8ff9..cceae68 100644
|
|
--- a/drivers/mmc/host/sunxi-mmc.c
|
|
+++ b/drivers/mmc/host/sunxi-mmc.c
|
|
@@ -766,10 +766,6 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
|
|
return -ENOMEM;
|
|
}
|
|
|
|
- ret = mmc_of_parse(mmc);
|
|
- if (ret)
|
|
- goto error_free_host;
|
|
-
|
|
host = mmc_priv(mmc);
|
|
host->mmc = mmc;
|
|
spin_lock_init(&host->lock);
|
|
@@ -806,8 +802,11 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
|
|
MMC_CAP_SDIO_IRQ;
|
|
mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP;
|
|
|
|
- ret = mmc_add_host(mmc);
|
|
+ ret = mmc_of_parse(mmc);
|
|
+ if (ret)
|
|
+ goto error_free_dma;
|
|
|
|
+ ret = mmc_add_host(mmc);
|
|
if (ret)
|
|
goto error_free_dma;
|
|
|
|
--
|
|
1.8.5.5
|
|
|