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

Commit 286b4fa3 authored by David Keitel's avatar David Keitel Committed by Liam Mark
Browse files

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 avatarKyle Yan <kyan@codeaurora.org>
parent 36e68e77
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,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);