From patchwork Sat Oct 28 10:26:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 117391 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp461095qgn; Sat, 28 Oct 2017 03:27:17 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RfkR7s4sVsIE4NinN0e5ciDKmhUgMeTFMYW2mZB89bT5m+fb9MDBXd4Y2MMwKmU1cjrqrQ X-Received: by 10.84.131.6 with SMTP id 6mr2644238pld.100.1509186437247; Sat, 28 Oct 2017 03:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509186437; cv=none; d=google.com; s=arc-20160816; b=bJ4CDlzg/FnOHPOyhID5FI6q6sfDXDwux7XrQdDXBd+rZfHUDb97+hZbcVMfLpk/AU 2H5ggL7rmoEzKny+hYAWDK0NUmSYrF5UDq2TnxD4vy4Z7kr23+TnNHMxJHx9PLQ9V4gN 284+VKzzkQrSvBwn9MaZqWbFbW2pFfX3kjW+VjAwfbK0UfyGJVrkOl1zyxHtU/Wirb+W nDRsoifTQVSeufnkyTnKIpJI6aPT+ytNOjrx2kooEsKj6HpxYEZ9EEtqTvd2W2ppkJQ4 llRxFcbmIfQOa3qCU+Q1oUSnWPnYnODg9aUyCYJhgRsZlVjj+3DwwLxRWJQFPOu8OHDv xAdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=t5nXTB2vRKTZGxtYn7QvoNaTlCDJDqm6EkgTvN4QagU=; b=tNcoaTdW9xdF58GRXVrIyo5HWLs/nYNluzMgI9KDblYdf53YVxban9oK0tegXZ3itP Q4spN08WQmaMrYSZlR+BghsMSiGJCgW5pX4kKpgk3xaJIGLuyW41QYegoX7D9dapxjQy i4EcVQWu41Wf3PfsyL3R/FCGOV8+hcGL+v1IRtMpmSSCgu890isdb0SVyn4JtV0Dpsh5 QJuIDGjw3DFwWGBwWO5o8GxkrE3tz82SYJ91B+fRjAHS5A6R27zUGVzPCyCM6JLfCV4u AQlv7C/qm6biWWTEDDQtOSs2mT+iTQCrRNv1UZ0TzsIp2pgNBUBhsk7I9byJUuvDVwE1 MtiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Kr4f2z4Q; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 f19si1394994pgn.241.2017.10.28.03.27.16; Sat, 28 Oct 2017 03:27:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Kr4f2z4Q; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751155AbdJ1K1P (ORCPT + 6 others); Sat, 28 Oct 2017 06:27:15 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:46568 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750930AbdJ1K1O (ORCPT ); Sat, 28 Oct 2017 06:27:14 -0400 Received: by mail-pg0-f68.google.com with SMTP id k7so7230437pga.3 for ; Sat, 28 Oct 2017 03:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=5fWCJE7bNhmxBfYo8DLvLWmOaRFffiGA9XzcpEIO03k=; b=Kr4f2z4QbKKJlK/zJUhb2ErPT832JxfmYM/pOpMqzJTLnMzxv79nA1iVSNGK2ROicJ ZQovAmzHRpUeKr66P5U20z2y7ts0NmKzwIvYP8OvuWKRHx2A6l+qXGbqY4ODh8PU2vlt YZQVD5lzlpF9PuE2F7/SGKYwNRza5Gi9PCVxk= 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; bh=5fWCJE7bNhmxBfYo8DLvLWmOaRFffiGA9XzcpEIO03k=; b=CnUM8lsqaL/1NtC1OZAWej0RbLgjTgBNxevIcvKC/h3Smf12o1Q8vULcHw5as/wEP/ e071Vn6mEY64oXFybvfgSht7WFPwxcEinLDNQM1dClShMLgGSdRaUWGt43uM4+s0d0T2 Wwr9zCi8n2cRAOz6CX+GEJZMJCg6vaSOaK45fx5fj5rei30y0K4bVAuNVwOiHDXMRSUa hWv2Mhh0U/LBwqgcL8m8ZK19QoDGMxePsTcezUZS4/dF5YsPsDdT2faXCZrIJdM6NHOp JEPauIVAdf17ebVmJwnKSdaCUHUDmwuDmOSlbxtkwnF+qN9KZaJktsL8+yonT8fQVmg7 Z2fg== X-Gm-Message-State: AMCzsaWfEoQBnD+S5RqmQH+d/7Q+0uKpXscmPMkOcSjwZOI/YBCNwz0x kPgrmqEn3Qwb76yuJRHO1ayjPQ== X-Received: by 10.98.107.133 with SMTP id g127mr3117677pfc.228.1509186433585; Sat, 28 Oct 2017 03:27:13 -0700 (PDT) Received: from localhost ([122.167.161.211]) by smtp.gmail.com with ESMTPSA id v76sm2710780pfk.78.2017.10.28.03.27.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Oct 2017 03:27:12 -0700 (PDT) From: Viresh Kumar To: Rob Herring , Frank Rowand Cc: Viresh Kumar , Vincent Guittot , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2] of: platform: Create dummy routines for !CONFIG_OF_ADDRESS Date: Sat, 28 Oct 2017 15:56:46 +0530 Message-Id: <2d798213e4fefc074a66ccb7ab2fc243ee2b1e1a.1509186356.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.rc1.236.g92ea95045093 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Few routines don't have their dummy counterparts which results in build failures where these routines are used without CONFIG_OF_ADDRESS enabled. Fix those by defining the dummy versions. Signed-off-by: Viresh Kumar --- V2: - Rebased again latest rc and resolved conflicts. - No comments received on V1. include/linux/of_platform.h | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) -- 2.15.0.rc1.236.g92ea95045093 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index fb908e598348..8a561e08bc9e 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -52,11 +52,6 @@ struct of_dev_auxdata { .platform_data = _pdata } extern const struct of_device_id of_default_bus_match_table[]; - -/* Platform drivers register/unregister */ -extern struct platform_device *of_device_alloc(struct device_node *np, - const char *bus_id, - struct device *parent); #ifdef CONFIG_OF extern struct platform_device *of_find_device_by_node(struct device_node *np); #else @@ -66,6 +61,12 @@ static inline struct platform_device *of_find_device_by_node(struct device_node } #endif +#ifdef CONFIG_OF_ADDRESS +/* Platform drivers register/unregister */ +extern struct platform_device *of_device_alloc(struct device_node *np, + const char *bus_id, + struct device *parent); + /* Platform devices and busses creation */ extern struct platform_device *of_platform_device_create(struct device_node *np, const char *bus_id, @@ -75,7 +76,6 @@ extern int of_platform_device_destroy(struct device *dev, void *data); 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_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, @@ -89,6 +89,33 @@ extern int devm_of_platform_populate(struct device *dev); extern void devm_of_platform_depopulate(struct device *dev); #else +static inline struct platform_device * +of_device_alloc(struct device_node *np, const char *bus_id, + struct device *parent) +{ + return NULL; +} + +/* Platform devices and busses creation */ +static inline struct platform_device * +of_platform_device_create(struct device_node *np, const char *bus_id, + struct device *parent) +{ + return NULL; +} + +static inline int of_platform_device_destroy(struct device *dev, void *data) +{ + return -ENODEV; +} + +static inline int of_platform_bus_probe(struct device_node *root, + const struct of_device_id *matches, + struct device *parent) +{ + return -ENODEV; +} + static inline int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup,