Skip to content

Commit

Permalink
mmci: fix crash with debug enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rabin Vincent authored and Pierre Ossman committed May 3, 2009
1 parent 4accfe2 commit 4ea580f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ static int __devinit mmci_probe(struct amba_device *dev, void *id)
}

host = mmc_priv(mmc);
host->mmc = mmc;
/* Bits 12 thru 19 is the designer */
host->hw_designer = (dev->periphid >> 12) & 0xff;
/* Bits 20 thru 23 is the revison */
Expand Down Expand Up @@ -545,7 +546,6 @@ static int __devinit mmci_probe(struct amba_device *dev, void *id)
host->mclk = clk_get_rate(host->clk);
DBG(host, "eventual mclk rate: %u Hz\n", host->mclk);
}
host->mmc = mmc;
host->base = ioremap(dev->res.start, SZ_4K);
if (!host->base) {
ret = -ENOMEM;
Expand Down

0 comments on commit 4ea580f

Please sign in to comment.