From patchwork Tue Jan 6 17:54:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 425845 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 11ECC14010F for ; Wed, 7 Jan 2015 08:41:49 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id F377C1A1090 for ; Wed, 7 Jan 2015 08:41:48 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id D4D751A083A for ; Wed, 7 Jan 2015 04:54:28 +1100 (AEDT) Received: by mail-pa0-f52.google.com with SMTP id eu11so31218784pac.25 for ; Tue, 06 Jan 2015 09:54:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sSo6/r3AbrzU+p1mgsNfBnAYvLidHdl9QqjajGfJr/4=; b=mj8x1s67G6Pu+u5nst1OjrpCl0ElN6WA6YLM9abO773UQnOFP4cRa0BdaAhBFtO2pi x9s4GrTB4qujzFkn+0AyoawSpi3swOTuQgR0XXgoNa2WnG6fKDac0t/I+vqrjNpBM0sV sibrPn+LWVKxyYeBGoBsIvv2wFZzBoJBO8mNJbjk7bHeYvP8mjcuUSkjRSsmB0BHo03V oIrxEAiNM8isb3dj5Ijzz85ihuNvWNM7ePeQsJ1n/HGylzTAniVRKPRanf5a+ybnUlrR X5pOeSz6lrMTWGtcwYkFVPrzy9Hy5jS5CaVwM6V6GpdZYsm1NGKZ/CS9xmHYnYfykTxq G+PQ== X-Gm-Message-State: ALoCoQmJa77Ni8fxG9wPcoWDvS/SJRejnA+eAuv5ZkgBC9z+Nq/y2+QxkBLHB7/KyoznAekq1lPL X-Received: by 10.70.89.174 with SMTP id bp14mr156049289pdb.136.1420566866681; Tue, 06 Jan 2015 09:54:26 -0800 (PST) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [70.73.24.112]) by mx.google.com with ESMTPSA id ka5sm41094963pbc.27.2015.01.06.09.54.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Jan 2015 09:54:25 -0800 (PST) From: mathieu.poirier@linaro.org To: geert@linux-m68k.org Subject: [PATCH] coresight: Fixing wrong #ifdef/#endif placement Date: Tue, 6 Jan 2015 10:54:12 -0700 Message-Id: <1420566852-20816-1-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Wed, 07 Jan 2015 08:40:27 +1100 Cc: mathieu.poirier@linaro.org, linux-sh@vger.kernel.org, pratikp@codeaurora.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Mathieu Poirier Fixing problem reported by: https://lkml.org/lkml/2015/1/6/86 The #ifdef/#endif is wrong and prevents the stub of function of_get_coresight_platform_data() from being visible when CONFIG_OF is not defined. Moving CONFIG_OF condition out of CONFIG_CORESIGHT, making them both independent. Signed-off-by: Mathieu Poirier --- include/linux/coresight.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 5d3c54311f7a..4404033ee879 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -239,10 +239,6 @@ extern void coresight_disable(struct coresight_device *csdev); extern int coresight_is_bit_set(u32 val, int position, int value); extern int coresight_timeout(void __iomem *addr, u32 offset, int position, int value); -#ifdef CONFIG_OF -extern struct coresight_platform_data *of_get_coresight_platform_data( - struct device *dev, struct device_node *node); -#endif #else static inline struct coresight_device * coresight_register(struct coresight_desc *desc) { return NULL; } @@ -254,10 +250,14 @@ static inline int coresight_is_bit_set(u32 val, int position, int value) { return 0; } static inline int coresight_timeout(void __iomem *addr, u32 offset, int position, int value) { return 1; } +#endif + #ifdef CONFIG_OF +extern struct coresight_platform_data *of_get_coresight_platform_data( + struct device *dev, struct device_node *node); +#else static inline struct coresight_platform_data *of_get_coresight_platform_data( struct device *dev, struct device_node *node) { return NULL; } #endif -#endif #endif