[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1432565608-26036-8-git-send-email-tomeu.vizoso@collabora.com>
Date: Mon, 25 May 2015 16:53:11 +0200
From: Tomeu Vizoso <tomeu.vizoso@...labora.com>
To: linux-arm-kernel@...ts.infradead.org
Cc: Stéphane Marchesin
<stephane.marchesin@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Alexander Holler <holler@...oftware.de>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Tomeu Vizoso <tomeu.vizoso@...labora.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 07/21] of/platform: Ensure device registration on lookup
When looking up a platform device from its device node, ensure that the
device has been registered before doing the actual search.
This increases the chances of the device having been probed by that
time, reducing deferred probes.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
---
drivers/of/platform.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index cc5d808..af2bc75 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -46,6 +46,8 @@ struct platform_device *of_find_device_by_node(struct device_node *np)
{
struct device *dev;
+ of_platform_device_ensure(np);
+
dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match);
return dev ? to_platform_device(dev) : NULL;
}
--
2.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists