提交 b9b52918 编写于 作者: L Lee Jones 提交者: Russell King

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: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 f8f5701b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册