devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OF: Link platform device resources properly.
@ 2013-01-03 22:31 Pantelis Antoniou
  2013-01-14 14:57 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Pantelis Antoniou @ 2013-01-03 22:31 UTC (permalink / raw)
  To: Grant Likely
  Cc: Matt Porter, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	Pantelis Antoniou, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, Russ Dill

The resources of the platform devices created by the OF core were
not properly linked. Make sure that they are, so that we don't get
any crashes when trying to remove the device.

Signed-off-by: Pantelis Antoniou <panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
---
 drivers/of/device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/device.c b/drivers/of/device.c
index 4c74e4f..d75fcaf 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -62,6 +62,9 @@ int of_device_add(struct platform_device *ofdev)
 	if (!ofdev->dev.parent)
 		set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node));
 
+	/* make sure we add the resources to the appropriate lists */
+	platform_device_link_resources(ofdev);
+
 	return device_add(&ofdev->dev);
 }
 
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-14 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03 22:31 [PATCH] OF: Link platform device resources properly Pantelis Antoniou
2013-01-14 14:57 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).