ANDROID: GKI: 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>
Bug: 147914088
(cherry picked from commit cb68ecf31b744d35c2f7cd5a1a2c2eae7e40ce8c)
Signed-off-by: Saravana Kannan <saravanak@google.com>
This commit is contained in:
David Keitel
2016-02-04 10:12:25 -08:00
committed by Saravana Kannan
parent 3c8a7d12de
commit 9924682211

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[] = {
@@ -191,6 +192,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);