linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: Have of_device_add call platform_device_add rather than device_add
@ 2012-11-21  7:24 Jason Gunthorpe
  2012-11-21 15:51 ` Grant Likely
  0 siblings, 1 reply; 10+ messages in thread
From: Jason Gunthorpe @ 2012-11-21  7:24 UTC (permalink / raw)
  To: linux-kernel, Grant Likely, Rob Herring, Greg Kroah-Hartman
  Cc: devicetree-discuss

This allows platform_device_add a chance to call insert_resource
on all of the resources from OF. At a minimum this fills in proc/iomem
and presumably makes resource tracking and conflict detection work
better.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 drivers/of/device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Tested on PPC32 and ARM32 embedded kernels.

diff --git a/drivers/of/device.c b/drivers/of/device.c
index 4c74e4f..a5b67dc 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -62,7 +62,7 @@ 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));
 
-	return device_add(&ofdev->dev);
+	return platform_device_add(ofdev);
 }
 
 int of_device_register(struct platform_device *pdev)
-- 
1.7.4.1


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

end of thread, other threads:[~2012-11-26 16:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21  7:24 [PATCH] of: Have of_device_add call platform_device_add rather than device_add Jason Gunthorpe
2012-11-21 15:51 ` Grant Likely
2012-11-21 16:05   ` Grant Likely
2012-11-21 17:44   ` Jason Gunthorpe
2012-11-21 18:07     ` Grant Likely
2012-11-21 18:14       ` Jason Gunthorpe
2012-11-22 15:36         ` Grant Likely
2012-11-22 17:30           ` Jason Gunthorpe
2012-11-26 14:30             ` Grant Likely
2012-11-26 15:28             ` Grant Likely

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).