From patchwork Tue Apr 10 07:52:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 7698 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 68E4423E1D for ; Tue, 10 Apr 2012 07:53:26 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 05E64A186E2 for ; Tue, 10 Apr 2012 07:53:25 +0000 (UTC) Received: by iage36 with SMTP id e36so9840111iag.11 for ; Tue, 10 Apr 2012 00:53:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=phTBeEvIrtT9XFJbAQ8UL3GE4LL3sXDNeYAlnoQ+UPc=; b=CtffevQ4jN1hKngbUdtCqjHenzDAzYPXQXSAF6mXLDABUz3T3G4PUfD3qOn4YJ9hrA vvPO72lJI5ALBKIXi4k2DfqzedGBNdcdSozSEhR4MKcqZkK8umA9JsVpmVmpDGZ2dw79 X3anUQyTLBVCB/wu2nTfts8FpJrj7R7yFdjA1nOllDMxKkyVaF0BxGcfzYVYchxza+V5 tWH6lNJE/103thk892WZ0fLjTLrWqQbej7Z7tN+1mAJVPb3Yqi6qrvzFbbVmY9IZOqxb MPiHOE0qPYvS+8zdiWTbeUG6+8P7sr8HwOKk2oXMz0lJTk+BN4vwbHpdK2ZqeeK/4xE9 iIQw== Received: by 10.50.173.35 with SMTP id bh3mr1328651igc.38.1334044405320; Tue, 10 Apr 2012 00:53:25 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.164.217 with SMTP id f25csp8980iby; Tue, 10 Apr 2012 00:53:24 -0700 (PDT) Received: by 10.213.20.15 with SMTP id d15mr589888ebb.117.1334044403418; Tue, 10 Apr 2012 00:53:23 -0700 (PDT) Received: from eu1sys200aog106.obsmtp.com (eu1sys200aog106.obsmtp.com. [207.126.144.121]) by mx.google.com with SMTP id g1si5516987eeo.83.2012.04.10.00.52.59 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 00:53:23 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.121 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.121; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.121 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob106.postini.com ([207.126.147.11]) with SMTP ID DSNKT4Pm03NJJ/mNvZm18db9220KpxtCC8KU@postini.com; Tue, 10 Apr 2012 07:53:23 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 13CDFBA; Tue, 10 Apr 2012 07:44:21 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 56B641537; Tue, 10 Apr 2012 07:52:44 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 169E6A807B; Tue, 10 Apr 2012 09:52:40 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 10 Apr 2012 09:52:43 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Shawn Guo , Thomas Abraham , Dong Aisheng , Rajendra Nayak , Haojian Zhuang , Linus Walleij , Stephen Rothwell , Stephen Warren Subject: [PATCH] pinctrl: fix build failure on PPC Date: Tue, 10 Apr 2012 09:52:37 +0200 Message-ID: <1334044357-14486-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkFljZoWh0NevlsjINgAOroUWrvJdg+OoUDXBgXNMqk/DAEhExd1+N2zgYe+9JypV364LNw From: Linus Walleij commit 23289e6ecc6d ("pinctrl: core device tree mapping table parsing support") caused a build failure on PPC: drivers/pinctrl/devicetree.c: In function 'dt_free_map': drivers/pinctrl/devicetree.c:44:42: error: dereferencing pointer to incomplete type drivers/pinctrl/devicetree.c:45:6: error: dereferencing pointer to incomplete type drivers/pinctrl/devicetree.c: In function 'dt_to_map_one_config': drivers/pinctrl/devicetree.c:140:21: error: dereferencing pointer to incomplete type drivers/pinctrl/devicetree.c:141:10: error: dereferencing pointer to incomplete type drivers/pinctrl/devicetree.c:146:11: error: dereferencing pointer to incomplete type This is probably because the Makefile for pinctrl contains this, that makes a small piece of the implementation build and link in isolation: obj-$(CONFIG_OF) += devicetree.o So let's use some local Kconfig option that depends on both OF and PINCTRL so that this file is only compiled if you have both enabled. Reported-by: Stephen Rothwell Cc: Stephen Rothwell Cc: Stephen Warren Signed-off-by: Linus Walleij --- drivers/pinctrl/Kconfig | 5 +++++ drivers/pinctrl/Makefile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index abfb964..d68c878 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -17,6 +17,11 @@ config PINMUX config PINCONF bool "Support pin configuration controllers" +config PINCTRL_OF + bool + depends on OF + default y if OF + config GENERIC_PINCONF bool select PINCONF diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile index 049c9fb..5412f60 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile @@ -5,7 +5,7 @@ ccflags-$(CONFIG_DEBUG_PINCTRL) += -DDEBUG obj-$(CONFIG_PINCTRL) += core.o obj-$(CONFIG_PINMUX) += pinmux.o obj-$(CONFIG_PINCONF) += pinconf.o -obj-$(CONFIG_OF) += devicetree.o +obj-$(CONFIG_PINCTRL_OF) += devicetree.o obj-$(CONFIG_GENERIC_PINCONF) += pinconf-generic.o obj-$(CONFIG_PINCTRL_PXA3xx) += pinctrl-pxa3xx.o obj-$(CONFIG_PINCTRL_MMP2) += pinctrl-mmp2.o