From 99246822110212f1968bcfea97b2e1a06349fb09 Mon Sep 17 00:00:00 2001 From: David Keitel Date: Thu, 4 Feb 2016 10:12:25 -0800 Subject: [PATCH] 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 Signed-off-by: Rishabh Bhatnagar Bug: 147914088 (cherry picked from commit cb68ecf31b744d35c2f7cd5a1a2c2eae7e40ce8c) Signed-off-by: Saravana Kannan --- drivers/of/platform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 6e9e2755b9ea..8b339f03a0ad 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -20,6 +20,7 @@ #include #include #include +#include #include 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);