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: 19172 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4ED9725A1B for ; Thu, 15 Aug 2013 19:43:36 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id 15sf1421155vea.9 for ; Thu, 15 Aug 2013 12:43:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=78vBIzqlSIICwU9824Ni8d3swrSKvWvZG0bdXpdlns8=; b=BSajRIOHmiOmUJ1K79klW7yF5xbje+Zege+6lJuaZtNY1wUfpAWvMLqcV2cc5UDDKi flU2hCK6Alturc3nkzSAo7Z03LJzHfxocPKJZRlzQ3BlvTYEnHLofgGtRYr/LRLy37fM gTmx98eVTMy9PKPdBAL9Tuiplxdqs9SllQqsfd5oW3PnWJv5pwDNOuuU8DBTdxTqhbOI j7ZzzPOo4tSP/Q7GskkE5j0tS81pVOOwOKj6IyPOH+AlyPVy8aB5T5DeWbN06n/X1RfK i6BgMQ9gWR+FxsrKr14BGgMXLl3qzPqodbKmJF3gZ+Sra96qySkscSmniCJF3JFhGK5M GqYw== X-Received: by 10.58.46.172 with SMTP id w12mr5700591vem.16.1376595815403; Thu, 15 Aug 2013 12:43:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.130.196 with SMTP id og4ls429377qeb.69.gmail; Thu, 15 Aug 2013 12:43:35 -0700 (PDT) X-Received: by 10.220.206.195 with SMTP id fv3mr15804195vcb.15.1376595815267; Thu, 15 Aug 2013 12:43:35 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id se5si213082vdc.140.2013.08.15.12.43.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 12:43:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id oz10so900891veb.31 for ; Thu, 15 Aug 2013 12:43:35 -0700 (PDT) X-Gm-Message-State: ALoCoQn85JTNeyn0GaW+s9OFHVEkyB0Kpw1ycbMLFNZ56wgmhrwT5M/kXLn+rQ8fPyDOvIj7WlD4 X-Received: by 10.58.19.162 with SMTP id g2mr15973246vee.12.1376595815131; Thu, 15 Aug 2013 12:43:35 -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 u4csp29972vcz; Thu, 15 Aug 2013 12:43:34 -0700 (PDT) X-Received: by 10.152.116.109 with SMTP id jv13mr3372566lab.30.1376595814032; Thu, 15 Aug 2013 12:43:34 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx.google.com with ESMTPS id j10si384870lbj.75.2013.08.15.12.43.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 12:43:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.49 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id ev20so865055lab.22 for ; Thu, 15 Aug 2013 12:43:33 -0700 (PDT) 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 Cc: Stephen Warren , Linus Walleij , Laxman Dewangan 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 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: , 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 */