aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2009-04-16 23:14:19 -0400
committerPierre Ossman <pierre@ossman.eu>2009-05-03 16:12:27 -0400
commit4ea580f1db62c5419e6690878fd61a740f3aae8e (patch)
treec1eac49aef0f4a4f097f6bd21790694a6443951a /drivers
parent4accfe2577fab83e41db02282570e849f24ddf53 (diff)
mmci: fix crash with debug enabled
If MMC debugging is enabled, the mmci driver oopses because the DBG macro uses host->mmc before it is set. Set it earlier. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/mmci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index a663429b3d55..36875dcfa492 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -514,6 +514,7 @@ static int __devinit mmci_probe(struct amba_device *dev, void *id)
514 } 514 }
515 515
516 host = mmc_priv(mmc); 516 host = mmc_priv(mmc);
517 host->mmc = mmc;
517 /* Bits 12 thru 19 is the designer */ 518 /* Bits 12 thru 19 is the designer */
518 host->hw_designer = (dev->periphid >> 12) & 0xff; 519 host->hw_designer = (dev->periphid >> 12) & 0xff;
519 /* Bits 20 thru 23 is the revison */ 520 /* Bits 20 thru 23 is the revison */
@@ -545,7 +546,6 @@ static int __devinit mmci_probe(struct amba_device *dev, void *id)
545 host->mclk = clk_get_rate(host->clk); 546 host->mclk = clk_get_rate(host->clk);
546 DBG(host, "eventual mclk rate: %u Hz\n", host->mclk); 547 DBG(host, "eventual mclk rate: %u Hz\n", host->mclk);
547 } 548 }
548 host->mmc = mmc;
549 host->base = ioremap(dev->res.start, SZ_4K); 549 host->base = ioremap(dev->res.start, SZ_4K);
550 if (!host->base) { 550 if (!host->base) {
551 ret = -ENOMEM; 551 ret = -ENOMEM;