From patchwork Sun Oct 7 17:40:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 1561891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 6144B3FD9C for ; Sun, 7 Oct 2012 17:42:57 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TKuqR-0002Rl-Qi; Sun, 07 Oct 2012 17:40:51 +0000 Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TKuqN-0002RH-B5 for linux-arm-kernel@lists.infradead.org; Sun, 07 Oct 2012 17:40:48 +0000 Received: by mail-pb0-f49.google.com with SMTP id xa7so3651236pbc.36 for ; Sun, 07 Oct 2012 10:40:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=z/Pe1E5HVhdl/AgLLE1WtK2kvqPyoB7iUKv05onwIWg=; b=ARn5KUBmlgjzBPbgkR24Ml/p+ataj5eih4oHba7Khdy5IdY1UMIAi5Xa36zte74Mxm Z0VEimlhfiY0KeaG8idN4/5ddjVJsTkbCvzD7GGgbqvmryu+6gfB2YJWdSB/Yug3AuCn q25KT6q/CcTlh/xN9tOwWY9CzZVzCRC9LejMzI8twyrl2zylMDfHcC7FHZANxCsmSweg q8nuXC5jOtfqiA81H2+61AIyZrv3T8lQHfnp+hFVQBNuKwrcHOZi33YrojJIUb+QtGsS nVFFqNGUZelbx287LNZk5lxypwvo7aX9duESypw+8ECy+tqe+q/CCThK2eRhU52jkMWA 0b2g== Received: by 10.66.77.74 with SMTP id q10mr21556469paw.81.1349631645251; Sun, 07 Oct 2012 10:40:45 -0700 (PDT) Received: from quad.lixom.net (173-13-129-225-sfba.hfc.comcastbusiness.net. [173.13.129.225]) by mx.google.com with ESMTPS id j9sm9476400pav.15.2012.10.07.10.40.43 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 07 Oct 2012 10:40:44 -0700 (PDT) From: Olof Johansson To: Rob Herring Subject: [PATCH] of: add stub of_get_child_by_name for non-OF builds Date: Sun, 7 Oct 2012 10:40:54 -0700 Message-Id: <1349631654-20931-1-git-send-email-olof@lixom.net> X-Mailer: git-send-email 1.7.10.1.488.g05fbf7a X-Gm-Message-State: ALoCoQnSox4bmBCFkOkRx4n2g3cFZa5vUplBHhmNTfCFnVOENX7TNYG0PiVNKpX2z/JbcKqOgeG0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Olof Johansson , devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Srinivas Kandagatla X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Fixes build error on s3c6400_defconfig, introduced by commit 06455bbcab76e5f5225de5f38ab948d37a1c3587, "dt/s3c64xx/spi: Use of_get_child_by_name to get a named child". drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata': drivers/spi/spi-s3c64xx.c:838:2: error: implicit declaration of function 'of_get_child_by_name' [-Werror=implicit-function-declaration] Signed-off-by: Olof Johansson --- include/linux/of.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/of.h b/include/linux/of.h index 72843b7..b4e50d5 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -331,6 +331,13 @@ static inline bool of_have_populated_dt(void) #define for_each_child_of_node(parent, child) \ while (0) +static inline struct device_node *of_get_child_by_name( + const struct device_node *node, + const char *name) +{ + return NULL; +} + static inline int of_get_child_count(const struct device_node *np) { return 0;