packages: enable AP mode on r8188eu
[openwrt/staging/chunkeey.git] / target / linux / sunxi / patches-3.13 / 170-6-mmc-dont-call-mmc_of_parser-until-ready.patch
1 From 73797537f3904fec60a647b3b209bf7add092ad5 Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Mon, 17 Feb 2014 21:59:08 +0100
4 Subject: [PATCH] sunxi-mmc: Don't call mmc_of_parse until we're ready to
5
6 mmc_of_parse registers an irq handler for the gpio pins for cd, this irq
7 handler will reference host->ops, so don't call mmc_of_parse until we're
8 done setting everything up.
9
10 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
11 ---
12 drivers/mmc/host/sunxi-mmc.c | 9 ++++-----
13 1 file changed, 4 insertions(+), 5 deletions(-)
14
15 diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
16 index d5e8ff9..cceae68 100644
17 --- a/drivers/mmc/host/sunxi-mmc.c
18 +++ b/drivers/mmc/host/sunxi-mmc.c
19 @@ -766,10 +766,6 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
20 return -ENOMEM;
21 }
22
23 - ret = mmc_of_parse(mmc);
24 - if (ret)
25 - goto error_free_host;
26 -
27 host = mmc_priv(mmc);
28 host->mmc = mmc;
29 spin_lock_init(&host->lock);
30 @@ -806,8 +802,11 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
31 MMC_CAP_SDIO_IRQ;
32 mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP;
33
34 - ret = mmc_add_host(mmc);
35 + ret = mmc_of_parse(mmc);
36 + if (ret)
37 + goto error_free_dma;
38
39 + ret = mmc_add_host(mmc);
40 if (ret)
41 goto error_free_dma;
42
43 --
44 1.8.5.5
45