Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99246822 authored by David Keitel's avatar David Keitel Committed by Saravana Kannan
Browse files

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: default avatarDavid Keitel <dkeitel@codeaurora.org>
Signed-off-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
Bug: 147914088
(cherry picked from commit cb68ecf3)
Signed-off-by: default avatarSaravana Kannan <saravanak@google.com>
parent 3c8a7d12
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);