From patchwork Thu Aug 15 19:43:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2845269 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 981499F2F5 for ; Thu, 15 Aug 2013 19:44:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9EABC203E6 for ; Thu, 15 Aug 2013 19:44:07 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65BC7203E3 for ; Thu, 15 Aug 2013 19:44:06 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA3Sk-0007Jd-1C; Thu, 15 Aug 2013 19:44:02 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA3Sh-0007dq-Mi; Thu, 15 Aug 2013 19:43:59 +0000 Received: from mail-lb0-f180.google.com ([209.85.217.180]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA3Se-0007aO-1k for linux-arm-kernel@lists.infradead.org; Thu, 15 Aug 2013 19:43:56 +0000 Received: by mail-lb0-f180.google.com with SMTP id a16so953491lbj.11 for ; Thu, 15 Aug 2013 12:43: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:from:to:cc:subject:date:message-id; bh=78vBIzqlSIICwU9824Ni8d3swrSKvWvZG0bdXpdlns8=; b=AamhtKcLV6NQNWHsb5LK0clDQcmA7PMPXsi8aiccCsM47z/9aEG2zLI8gn+9K9T+Oo NY338ufrkxBQhCczB6BKs2u+0lplRtU3yJ8GZo5LRWlQoEWTHuC1zbthUVJGxCMIScDu BLKhvhJzFA8E33IgWfbkuXhe4QTXdDXIDp/uyP6Lr94PMbdYDsHWp84Moh6+UJy4MPUl NyPv1SWqNCPwnq5DYRfScXSNNPQZPX6nKghexf/cJykX5+2eNYHUhOQYcF33r8B8/o2b n6+YLE3BBaFXiI5Y4UcJEHZkZya6VYtBtQKu1JMcS2l5AfosCUEyYm8uN6GKHQLGHXmD 12gg== X-Gm-Message-State: ALoCoQn7Ghqc54P8v5lIrRQaMNZtaQkk5aclUvvuhYn1u9bA9G6+Jd5cr7lZg+ANCz2rK91dbh7L X-Received: by 10.112.132.193 with SMTP id ow1mr2569691lbb.40.1376595813427; Thu, 15 Aug 2013 12:43:33 -0700 (PDT) Received: from localhost.localdomain (c83-249-208-76.bredband.comhem.se. [83.249.208.76]) by mx.google.com with ESMTPSA id db5sm189391lac.10.2013.08.15.12.43.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 12:43:32 -0700 (PDT) From: Linus Walleij To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] pinctrl: add includes and ifdefs for non-DT builds Date: Thu, 15 Aug 2013 21:43:29 +0200 Message-Id: <1376595809-7053-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130815_154356_215152_78A8F76C X-CRM114-Status: GOOD ( 10.09 ) X-Spam-Score: -2.6 (--) Cc: Linus Walleij , Laxman Dewangan , Stephen Warren X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Commit e81c8f18afc4fdd6e34d8c83814b8b5134dbb30f "pinctrl: pinconf-generic: add generic APIs for mapping pinctrl node" Added function prototypes with implicit dependencies on other header files causing build warnings like this: In file included from arch/arm/mach-ux500/board-mop500-pins.c:12:0: include/linux/pinctrl/pinconf-generic.h:142:3: warning: 'struct device_node' declared inside parameter list [enabled by default] unsigned *reserved_maps, unsigned *num_maps); ^ include/linux/pinctrl/pinconf-generic.h:142:3: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] include/linux/pinctrl/pinconf-generic.h:142:3: warning: 'struct pinctrl_dev' declared inside parameter list [enabled by default] include/linux/pinctrl/pinconf-generic.h:145:3: warning: 'struct device_node' declared inside parameter list [enabled by default] unsigned *num_maps); ^ Let's just add ifdefs for non-DT systems (the actual code is already ifdefed) and #include to get the most important structs and forward-declare the pinctrl core structs. Reported-by: Olof Johansson Cc: Laxman Dewangan Signed-off-by: Linus Walleij --- include/linux/pinctrl/pinconf-generic.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index a472b93..83f5179 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -137,12 +137,21 @@ static inline unsigned long pinconf_to_config_packed(enum pin_config_param param return PIN_CONF_PACKED(param, argument); } +#ifdef CONFIG_OF + +#include +struct pinctrl_dev; +struct pinctrl_map; + int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev, struct device_node *np, struct pinctrl_map **map, unsigned *reserved_maps, unsigned *num_maps); int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev, struct device_node *np_config, struct pinctrl_map **map, unsigned *num_maps); + +#endif + #endif /* CONFIG_GENERIC_PINCONF */ #endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */