From patchwork Mon Aug 12 12:55:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: manjunath.goudar@linaro.org X-Patchwork-Id: 19010 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4F2BE248EC for ; Mon, 12 Aug 2013 12:55:34 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id cd7sf656740qab.9 for ; Mon, 12 Aug 2013 05:55:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=+UnDjzNluOtydZ6IP0aEIPQwpKKKJMeuEryclzoG4MU=; b=PpWq0Miz4494pTf45wuetMYopEdWvvQf8qgAqhGwnSzHz8rxI8opTGMTt4uK1YIaLX gxOMIaUL5nhaGlNxCsiNPvo+O8EX4M0zjiVMJ3Ege23f9t8R8PMFe61gA7m39Y4r56ow kAG8hRj/Re5+ihHxGp/tu7sWNDnsW7YLgLHZM/MfojFW6Ttu3SjRDEcqyoRBsJUDemc7 SeoX93FPD1JHAQpUmn5qSq8/FCTle2f4SzQ3+4/IJ6qAG7NGD+tF6sJzZDvGykulJED2 VbGX3wFmsNMaXJCHS2hNw/jb7Gv/IN9OsbFjeK1nSet4f4h92LDDXxcKxDa0YZgtRjxV 5Nvw== X-Received: by 10.236.51.225 with SMTP id b61mr10622807yhc.4.1376312133810; Mon, 12 Aug 2013 05:55:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.8 with SMTP id g8ls2369388qeg.67.gmail; Mon, 12 Aug 2013 05:55:33 -0700 (PDT) X-Received: by 10.58.19.136 with SMTP id f8mr6223701vee.98.1376312133674; Mon, 12 Aug 2013 05:55:33 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id i15si8248145vep.130.2013.08.12.05.55.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 05:55:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id kw10so2743172vcb.1 for ; Mon, 12 Aug 2013 05:55:33 -0700 (PDT) X-Gm-Message-State: ALoCoQmdB2YFqM/v9XzwXImuDUzhBlrhdVSzbedVL6SSt+J3KbVMUbi4J1VVulyepBxFf6CtqHS7 X-Received: by 10.58.6.210 with SMTP id d18mr6186835vea.96.1376312133283; Mon, 12 Aug 2013 05:55:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp93716vcz; Mon, 12 Aug 2013 05:55:32 -0700 (PDT) X-Received: by 10.68.50.138 with SMTP id c10mr24629593pbo.136.1376312132013; Mon, 12 Aug 2013 05:55:32 -0700 (PDT) Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by mx.google.com with ESMTPS id qn3si21347316pbc.212.2013.08.12.05.55.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 05:55:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.49 is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=209.85.160.49; Received: by mail-pb0-f49.google.com with SMTP id xb4so6778464pbc.22 for ; Mon, 12 Aug 2013 05:55:31 -0700 (PDT) X-Received: by 10.68.170.133 with SMTP id am5mr24162837pbc.104.1376312131409; Mon, 12 Aug 2013 05:55:31 -0700 (PDT) Received: from manjunath-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id s5sm37123902pbo.38.2013.08.12.05.55.24 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 05:55:30 -0700 (PDT) From: Manjunath Goudar To: linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, arnd@linaro.org, dsaxena@linaro.org, manjunath.goudar@linaro.org, linaro-kernel@lists.linaro.org, Arnd Bergmann , Pawel Moll , Samuel Ortiz , Lee Jones Subject: [PATCH V2] MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems Date: Mon, 12 Aug 2013 18:25:15 +0530 Message-Id: <1376312115-10326-1-git-send-email-manjunath.goudar@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1375592514-14213-1-git-send-email-manjunath.goudar@linaro.org> References: <1375592514-14213-1-git-send-email-manjunath.goudar@linaro.org> MIME-Version: 1.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: manjunath.goudar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch adds a of_find_node_by_phandle() and of_get_next_parent() function declaration dependence on"#ifdef CONFIG_OF" in "include/linux/of.h" else part return inline dummy implementations (returning NULL). Without this patch,build system can lead to issues. This was discovered during randconfig testing,in which VEXPRESS_CONFIG was enabled w/o CONFIG_OF being enabled,leading to the following error: CC drivers/mfd/vexpress-config.o drivers/mfd/vexpress-config.c: In function ‘__vexpress_config_func_get’: drivers/mfd/vexpress-config.c:117:4: error: implicit declaration of function ‘of_find_node_by_phandle’ [-Werror=implicit-function-declaration] bridge_node = of_find_node_by_phandle( ^ drivers/mfd/vexpress-config.c:117:16: warning: assignment makes pointer from integer without a cast [enabled by default] bridge_node = of_find_node_by_phandle( Signed-off-by: Manjunath Goudar Cc: Arnd Bergmann Cc: Pawel Moll Cc: Deepak Saxena Cc: Samuel Ortiz Cc: Lee Jones V2: -Made of_find_node_by_phandle() and of_get_next_parent() function declaration dependence on"#ifdef CONFIG_OF" in "include/linux/of.h" instead of Kconfig dependence setting in V1 patch and else part return inline dummy implementations (returning NULL) to fix the above randconfig error. --- include/linux/of.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index 90a8811..4be252a 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -196,10 +196,22 @@ static inline struct device_node *of_find_matching_node( #define for_each_matching_node_and_match(dn, matches, match) \ for (dn = of_find_matching_node_and_match(NULL, matches, match); \ dn; dn = of_find_matching_node_and_match(dn, matches, match)) -extern struct device_node *of_find_node_by_path(const char *path); + +#ifdef CONFIG_OF extern struct device_node *of_find_node_by_phandle(phandle handle); -extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_parent(struct device_node *node); +#else +static inline struct device_node *of_find_node_by_phandle(phandle handle) +{ + return NULL; +} +static inline struct device_node *of_get_next_parent(struct device_node *node) +{ + return NULL; +} +#endif +extern struct device_node *of_find_node_by_path(const char *path); +extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_child(const struct device_node *node, struct device_node *prev); extern struct device_node *of_get_next_available_child(