{"id":831595,"url":"http://patchwork.ozlabs.org/api/1.2/patches/831595/?format=json","web_url":"http://patchwork.ozlabs.org/project/devicetree-bindings/patch/2d798213e4fefc074a66ccb7ab2fc243ee2b1e1a.1509186356.git.viresh.kumar@linaro.org/","project":{"id":37,"url":"http://patchwork.ozlabs.org/api/1.2/projects/37/?format=json","name":"Devicetree Bindings","link_name":"devicetree-bindings","list_id":"devicetree.vger.kernel.org","list_email":"devicetree@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<2d798213e4fefc074a66ccb7ab2fc243ee2b1e1a.1509186356.git.viresh.kumar@linaro.org>","list_archive_url":null,"date":"2017-10-28T10:26:46","name":"[V2] of: platform: Create dummy routines for !CONFIG_OF_ADDRESS","commit_ref":null,"pull_url":null,"state":"superseded","archived":true,"hash":"2e95c5cc8b928ba581b922ffcd119a5902ea28cd","submitter":{"id":15374,"url":"http://patchwork.ozlabs.org/api/1.2/people/15374/?format=json","name":"Viresh Kumar","email":"viresh.kumar@linaro.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/devicetree-bindings/patch/2d798213e4fefc074a66ccb7ab2fc243ee2b1e1a.1509186356.git.viresh.kumar@linaro.org/mbox/","series":[{"id":10713,"url":"http://patchwork.ozlabs.org/api/1.2/series/10713/?format=json","web_url":"http://patchwork.ozlabs.org/project/devicetree-bindings/list/?series=10713","date":"2017-10-28T10:26:46","name":"[V2] of: platform: Create dummy routines for !CONFIG_OF_ADDRESS","version":2,"mbox":"http://patchwork.ozlabs.org/series/10713/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/831595/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/831595/checks/","tags":{},"related":[],"headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Kr4f2z4Q\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yPH445MDkz9t2x\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSat, 28 Oct 2017 21:27:16 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751155AbdJ1K1P (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSat, 28 Oct 2017 06:27:15 -0400","from mail-pg0-f68.google.com ([74.125.83.68]:46568 \"EHLO\n\tmail-pg0-f68.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750930AbdJ1K1O (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Sat, 28 Oct 2017 06:27:14 -0400","by mail-pg0-f68.google.com with SMTP id k7so7230437pga.3\n\tfor <devicetree@vger.kernel.org>;\n\tSat, 28 Oct 2017 03:27:13 -0700 (PDT)","from localhost ([122.167.161.211])\n\tby smtp.gmail.com with ESMTPSA id\n\tv76sm2710780pfk.78.2017.10.28.03.27.11\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 28 Oct 2017 03:27:12 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id;\n\tbh=5fWCJE7bNhmxBfYo8DLvLWmOaRFffiGA9XzcpEIO03k=;\n\tb=Kr4f2z4QbKKJlK/zJUhb2ErPT832JxfmYM/pOpMqzJTLnMzxv79nA1iVSNGK2ROicJ\n\tZQovAmzHRpUeKr66P5U20z2y7ts0NmKzwIvYP8OvuWKRHx2A6l+qXGbqY4ODh8PU2vlt\n\tYZQVD5lzlpF9PuE2F7/SGKYwNRza5Gi9PCVxk=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=5fWCJE7bNhmxBfYo8DLvLWmOaRFffiGA9XzcpEIO03k=;\n\tb=CnUM8lsqaL/1NtC1OZAWej0RbLgjTgBNxevIcvKC/h3Smf12o1Q8vULcHw5as/wEP/\n\te071Vn6mEY64oXFybvfgSht7WFPwxcEinLDNQM1dClShMLgGSdRaUWGt43uM4+s0d0T2\n\tWwr9zCi8n2cRAOz6CX+GEJZMJCg6vaSOaK45fx5fj5rei30y0K4bVAuNVwOiHDXMRSUa\n\thWv2Mhh0U/LBwqgcL8m8ZK19QoDGMxePsTcezUZS4/dF5YsPsDdT2faXCZrIJdM6NHOp\n\tJEPauIVAdf17ebVmJwnKSdaCUHUDmwuDmOSlbxtkwnF+qN9KZaJktsL8+yonT8fQVmg7\n\tZ2fg==","X-Gm-Message-State":"AMCzsaWfEoQBnD+S5RqmQH+d/7Q+0uKpXscmPMkOcSjwZOI/YBCNwz0x\n\tkPgrmqEn3Qwb76yuJRHO1ayjPQ==","X-Google-Smtp-Source":"ABhQp+TqdfQVjTFvPwwHQr9nwe8PpqVMg/Y6tVTilpwzIvNGMSLokXQ/b7xKJOeOJz7yuTJ7F5fpHQ==","X-Received":"by 10.98.107.133 with SMTP id g127mr3117677pfc.228.1509186433585;\n\tSat, 28 Oct 2017 03:27:13 -0700 (PDT)","From":"Viresh Kumar <viresh.kumar@linaro.org>","To":"Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>","Cc":"Viresh Kumar <viresh.kumar@linaro.org>,\n\tVincent Guittot <vincent.guittot@linaro.org>,\n\tdevicetree@vger.kernel.org, linux-kernel@vger.kernel.org","Subject":"[PATCH V2] of: platform: Create dummy routines for\n\t!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":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"},"content":"Few routines don't have their dummy counterparts which results in build\nfailures where these routines are used without CONFIG_OF_ADDRESS\nenabled.\n\nFix those by defining the dummy versions.\n\nSigned-off-by: Viresh Kumar <viresh.kumar@linaro.org>\n---\nV2:\n- Rebased again latest rc and resolved conflicts.\n- No comments received on V1.\n\n include/linux/of_platform.h | 39 +++++++++++++++++++++++++++++++++------\n 1 file changed, 33 insertions(+), 6 deletions(-)","diff":"diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h\nindex fb908e598348..8a561e08bc9e 100644\n--- a/include/linux/of_platform.h\n+++ b/include/linux/of_platform.h\n@@ -52,11 +52,6 @@ struct of_dev_auxdata {\n \t  .platform_data = _pdata }\n \n extern const struct of_device_id of_default_bus_match_table[];\n-\n-/* Platform drivers register/unregister */\n-extern struct platform_device *of_device_alloc(struct device_node *np,\n-\t\t\t\t\t const char *bus_id,\n-\t\t\t\t\t struct device *parent);\n #ifdef CONFIG_OF\n extern struct platform_device *of_find_device_by_node(struct device_node *np);\n #else\n@@ -66,6 +61,12 @@ static inline struct platform_device *of_find_device_by_node(struct device_node\n }\n #endif\n \n+#ifdef CONFIG_OF_ADDRESS\n+/* Platform drivers register/unregister */\n+extern struct platform_device *of_device_alloc(struct device_node *np,\n+\t\t\t\t\t const char *bus_id,\n+\t\t\t\t\t struct device *parent);\n+\n /* Platform devices and busses creation */\n extern struct platform_device *of_platform_device_create(struct device_node *np,\n \t\t\t\t\t\t   const char *bus_id,\n@@ -75,7 +76,6 @@ extern int of_platform_device_destroy(struct device *dev, void *data);\n extern int of_platform_bus_probe(struct device_node *root,\n \t\t\t\t const struct of_device_id *matches,\n \t\t\t\t struct device *parent);\n-#ifdef CONFIG_OF_ADDRESS\n extern int of_platform_populate(struct device_node *root,\n \t\t\t\tconst struct of_device_id *matches,\n \t\t\t\tconst struct of_dev_auxdata *lookup,\n@@ -89,6 +89,33 @@ extern int devm_of_platform_populate(struct device *dev);\n \n extern void devm_of_platform_depopulate(struct device *dev);\n #else\n+static inline struct platform_device *\n+of_device_alloc(struct device_node *np, const char *bus_id,\n+\t\tstruct device *parent)\n+{\n+\treturn NULL;\n+}\n+\n+/* Platform devices and busses creation */\n+static inline struct platform_device *\n+of_platform_device_create(struct device_node *np, const char *bus_id,\n+\t\t\t  struct device *parent)\n+{\n+\treturn NULL;\n+}\n+\n+static inline int of_platform_device_destroy(struct device *dev, void *data)\n+{\n+\treturn -ENODEV;\n+}\n+\n+static inline int of_platform_bus_probe(struct device_node *root,\n+\t\t\t\t\tconst struct of_device_id *matches,\n+\t\t\t\t\tstruct device *parent)\n+{\n+\treturn -ENODEV;\n+}\n+\n static inline int of_platform_populate(struct device_node *root,\n \t\t\t\t\tconst struct of_device_id *matches,\n \t\t\t\t\tconst struct of_dev_auxdata *lookup,\n","prefixes":["V2"]}