From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9WBI-0008Mf-MQ for barebox@lists.infradead.org; Wed, 14 Aug 2013 08:11:49 +0000 From: Sascha Hauer Date: Wed, 14 Aug 2013 10:11:21 +0200 Message-Id: <1376467885-29489-4-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1376467885-29489-1-git-send-email-s.hauer@pengutronix.de> References: <1376467885-29489-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 3/7] of: default to internal tree in of_find_node_by_path_from To: barebox@lists.infradead.org So that of_find_node_by_path_from can be used easier. Signed-off-by: Sascha Hauer --- drivers/of/base.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/base.c b/drivers/of/base.c index b8cdec5..3ebd672 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1211,6 +1211,9 @@ struct device_node *of_find_node_by_path_from(struct device_node *from, { char *slash, *p, *freep; + if (!from) + from = root_node; + if (!from || !path || *path != '/') return NULL; -- 1.8.4.rc2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox