of: platform: initialize of_reserved_mem

Initialize reserved memory as part of of_platform_device_create_pdata.

Change-Id: I6bb6ba8279af6771cb61087405cb915f4a0602b3
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
This commit is contained in:
David Keitel 2016-02-04 10:12:25 -08:00 committed by Rishabh Bhatnagar
parent b1dc513c03
commit cb68ecf31b

View file

@ -20,6 +20,7 @@
#include <linux/of_iommu.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
const struct of_device_id of_default_bus_match_table[] = {
@ -188,6 +189,7 @@ static struct platform_device *of_platform_device_create_pdata(
dev->dev.bus = &platform_bus_type;
dev->dev.platform_data = platform_data;
of_msi_configure(&dev->dev, dev->dev.of_node);
of_reserved_mem_device_init_by_idx(&dev->dev, dev->dev.of_node, 0);
if (of_device_add(dev) != 0) {
platform_device_put(dev);