Received: by 10.223.185.116 with SMTP id b49csp518592wrg; Fri, 23 Feb 2018 02:28:20 -0800 (PST) X-Google-Smtp-Source: AH8x227IGNq7x3yKeDA5KmE/Jntk8hQQK/NFvCR/D886fT41/FGn/GRTOXUcGejHyD0OUap3CXfo X-Received: by 10.101.69.67 with SMTP id x3mr1066914pgr.69.1519381700713; Fri, 23 Feb 2018 02:28:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519381700; cv=none; d=google.com; s=arc-20160816; b=0mISnPiS9dZvrgoauWPq6sgZyLb81dpW7hqNUCWKSLpyYVn0XPBWaVwcVkFDMUqNtg J8qTX4jpMAIrHenoqkBxAxq1gg57Vuxd9DY9k78T1PaR2KUJ0qmy/P/VqszNnuKhNjw7 +NNg9EFSenpwKgkSHC5tofdHyb0j28/B4BDv5yhjYr2eu5cnzKBuhK1uGQw9H+0g1+Jy krOYZh62Z8qwJ4tM9kRZJqQdB1RTm+s5lGvnkbHPtkaNc6ymBD+LXDdF/EsqRAlw7HzL X0UXvL+/8JthInwjQsG0IYOnptVh2TLYShn2Axf7jFrTVQ6vCHBaw0se5BjFvPArLfQj unfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=IX4N6db+RjJ2MZ+2zAzs8Pxe8B0/9+OqWz8edyDgGcE=; b=WEuSACRRogeCH9Xwsib5BvdDRlPVfi04p/XC3Nl9u77n5UVpbwvDfET+zbwYu1gjV5 BKDBteyi/IubaKWdrHrRLFlKKkMIXFpdNQLM3yPxZMzkqx3fa0+d4AKN3bsb5Fmk3uio x+oNVyiRy088llDiW4DG9nw4C0FFO2PcdZuuGqpTmYtGKLi6xWNd6ITx0Mhwz7qCvyU8 VYRkBaycczalarE3qGA30ZhKwEpqnaFEt2HbV3iQXL1/CVu63ZcBhNGqYrt+GDb8d//w shxdlnGjwsnbXIode3B6aTGejUWMPqf4xAEX1EoCx0VCzrJxCBxckhfz9lJaqJ7l/cHr iQQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Du3+6e4U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2-v6si1561807plo.627.2018.02.23.02.28.06; Fri, 23 Feb 2018 02:28:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Du3+6e4U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751510AbeBWKYP (ORCPT + 99 others); Fri, 23 Feb 2018 05:24:15 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:43191 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbeBWKYL (ORCPT ); Fri, 23 Feb 2018 05:24:11 -0500 Received: by mail-pg0-f66.google.com with SMTP id f6so3193822pgs.10 for ; Fri, 23 Feb 2018 02:24:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=IX4N6db+RjJ2MZ+2zAzs8Pxe8B0/9+OqWz8edyDgGcE=; b=Du3+6e4UD3MMA3/xxe2MmIsOEbX6Ss88dkaF3te+A/egyfjjcqC9bZjA9bacRkdC5E pi7yhV7KyLGKTX8F6S7ylChztyR272rKb0eFkW82UYCcFPJOkzOiJ6r0NkUi8w7bZvbi 5OvDDX/H7QvUm6o410P4M1EAKRyMaXCHvHEkk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=IX4N6db+RjJ2MZ+2zAzs8Pxe8B0/9+OqWz8edyDgGcE=; b=SA4VD8/xmIoyk4FdVwoSB5TuuNWtZoIVN4liYjh55YEeh93aP/80bQrgyDYYaBged4 7RCnctHPx3Fu+PLQI9dazavANFsGisb1vLQvMznQ9fWsBFrs1Zls7lQzJ7VakZhmR/Hp yiOSjy5Xx2nAc8gm79K549FGUzU6XpC60Vay3B8xad6nRJSvcRM45r7XpFiycj87mhQU 5pEsTEmBmLIThq3T61JWvSZfaIIGPI/LvLfN4ujtfMc1Wzpw/1aMzk5RZh8tAfquT1vv nWEycD3Cx0NUsJAzPJIBTFwgljynzStYKtHX5xRFqAsazQSN0Rfou9E+IlGBlD3i7uef 02rQ== X-Gm-Message-State: APf1xPCbZrj3GohJ/TXHsINfMIUtEfLbbxkfO9DwwnqeRLDaB2tSHruB CoO0mlMKw91lNJ0QWNBwnD+8jQ== X-Received: by 10.98.166.85 with SMTP id t82mr1253182pfe.237.1519381450706; Fri, 23 Feb 2018 02:24:10 -0800 (PST) Received: from localhost ([122.167.232.138]) by smtp.gmail.com with ESMTPSA id r28sm4389295pfl.9.2018.02.23.02.24.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 02:24:09 -0800 (PST) From: Viresh Kumar To: Greg Kroah-Hartman Cc: Viresh Kumar , Vincent Guittot , Stephen Boyd , Rajendra Nayak , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robdclark@gmail.com, s.hauer@pengutronix.de, l.stach@pengutronix.de, shawnguo@kernel.org, fabio.estevam@nxp.com, nm@ti.com, xuwei5@hisilicon.com, robh+dt@kernel.org, olof@lixom.net Subject: [PATCH V7 02/13] of: platform: Make of_platform_bus_create() global Date: Fri, 23 Feb 2018 15:53:41 +0530 Message-Id: <0f725b5b58bcdc22d03a436ad8243b98c962593a.1519380923.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The boot constraints core needs to create platform or AMBA devices corresponding to a compatible string and not for rest of the nodes in DT. of_platform_bus_create() fits in the best to achieve that. Allow it to be used outside of platform.c. Signed-off-by: Viresh Kumar --- drivers/of/platform.c | 8 ++++---- include/linux/of_platform.h | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 72853f9043e6..dfbb9f38cb37 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -392,10 +392,10 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l * Creates a platform_device for the provided device_node, and optionally * recursively create devices for all the child nodes. */ -static int of_platform_bus_create(struct device_node *bus, - const struct of_device_id *matches, - const struct of_dev_auxdata *lookup, - struct device *parent, bool strict) +int of_platform_bus_create(struct device_node *bus, + const struct of_device_id *matches, + const struct of_dev_auxdata *lookup, + struct device *parent, bool strict) { const struct of_dev_auxdata *auxdata; struct device_node *child; diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 5fb20afaf895..7a5313553c2a 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -76,6 +76,10 @@ extern int of_platform_bus_probe(struct device_node *root, const struct of_device_id *matches, struct device *parent); #ifdef CONFIG_OF_ADDRESS +extern int of_platform_bus_create(struct device_node *bus, + const struct of_device_id *matches, + const struct of_dev_auxdata *lookup, + struct device *parent, bool strict); extern int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, @@ -89,6 +93,13 @@ extern int devm_of_platform_populate(struct device *dev); extern void devm_of_platform_depopulate(struct device *dev); #else +static inline int of_platform_bus_create(struct device_node *bus, + const struct of_device_id *matches, + const struct of_dev_auxdata *lookup, + struct device *parent, bool strict) +{ + return -ENODEV; +} static inline int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, -- 2.15.0.194.g9af6a3dea062