mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ARM: 7422/1: mmc: mmci: Allocate platform memory during Device Tree boot
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 <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Russell King <[email protected]>
This commit is contained in:
parent
f8f5701bda
commit
b9b52918ab
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue