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: 5575871 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8C1339F443 for ; Tue, 6 Jan 2015 17:54:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C95E201EC for ; Tue, 6 Jan 2015 17:54:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A3988201EF for ; Tue, 6 Jan 2015 17:54:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754492AbbAFRy2 (ORCPT ); Tue, 6 Jan 2015 12:54:28 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:64227 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753388AbbAFRy1 (ORCPT ); Tue, 6 Jan 2015 12:54:27 -0500 Received: by mail-pa0-f53.google.com with SMTP id kq14so31404222pab.12 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=HQdeCx9TLs7k3NOJ8tTSPbHbEXTXIUgVvA5RH0V9ETuIPxAe357/xdkHDoJt9CV4xC N+wVwVjLwphzBqqzbJ6o7TgukY2Sat3dvXVaGpjpO3wkPJh9VFKl8Q76eeeA9ggKcJ9w U3/rinBXbeAt4EfozafO9oFjup8P8QdAKFrlmAoXJclfksstxUDMeiTprzOqqJifoXZz ol7kSXOfp1JA7eMp4+vLIuNz515UiThVu+6MBP4Cs2U72S6upewsd8jSyrL0p8BXWLcC Piy7Ggen0fZbU0X42uUC4tiN0gMvvPEpAIyTf/xJ0lMmjJR0mc0ZMzUIntcRIprQFEA9 9i1g== X-Gm-Message-State: ALoCoQmrXI1wdi00/chjtM+i8AgNxIwD5POWEv7R3dZfppgZRrrU6at2jvgQ3/D27dfND8+xf1tr 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 Cc: linux-kernel@vger.kernel.org, pratikp@codeaurora.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, mathieu.poirier@linaro.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 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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