Skip to content

Commit

Permalink
ARM: 7422/1: mmc: mmci: Allocate platform memory during Device Tree boot
Browse files Browse the repository at this point in the history
When booting with Device Tree enabled, platform specific information
is gathered by parsing the DT binary. Platform data is subsequently
populated with the result. The memory required for this is not
automatically allocated during Device Tree boot, so we'll do it here
instead.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Lee Jones authored and Russell King committed Jun 14, 2012
1 parent f8f5701 commit b9b5291
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,12 @@ static int __devinit mmci_probe(struct amba_device *dev,
return -EINVAL;
}

if (!plat) {
plat = devm_kzalloc(&dev->dev, sizeof(*plat), GFP_KERNEL);
if (!plat)
return -ENOMEM;
}

if (np)
mmci_dt_populate_generic_pdata(np, plat);

Expand Down

0 comments on commit b9b5291

Please sign in to comment.