From patchwork Fri Oct 7 06:19:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Miao X-Patchwork-Id: 118204 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AD9A2B71A4 for ; Fri, 7 Oct 2011 17:19:34 +1100 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RC3mG-0004RD-TN; Fri, 07 Oct 2011 06:19:25 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RC3mG-0001aD-MU; Fri, 07 Oct 2011 06:19:24 +0000 Received: from mail-vx0-f177.google.com ([209.85.220.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RC3mE-0001Zv-1y for linux-arm-kernel@lists.infradead.org; Fri, 07 Oct 2011 06:19:22 +0000 Received: by vcbfo1 with SMTP id fo1so3890515vcb.36 for ; Thu, 06 Oct 2011 23:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=xsjjf1CdD7sz+jU5JNHAHPIdvG3keR5zZjOBI7PvYUc=; b=O++hp2/HeDEcrvt5Pwe5+eCvgZNuMz6G/cg/7jPM2YJj3ivAkdx34HqSrjjDJgfilG NXgHepJUSDDkS11D/kj8MSeaCi66XGWL2ekUl3gU8Ve2R3Kzoz1vcRHEACHvwrJjca+k rwBB1k3WWBgE9FvCGenff5UEDl9pvyAXMZ+os= Received: by 10.52.90.45 with SMTP id bt13mr1172142vdb.25.1317968361093; Thu, 06 Oct 2011 23:19:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.109.198 with HTTP; Thu, 6 Oct 2011 23:19:01 -0700 (PDT) In-Reply-To: <1317499438-14058-12-git-send-email-arnd@arndb.de> References: <1317499438-14058-1-git-send-email-arnd@arndb.de> <1317499438-14058-12-git-send-email-arnd@arndb.de> From: Eric Miao Date: Fri, 7 Oct 2011 14:19:01 +0800 Message-ID: Subject: Re: [PATCH 11/26] ARM: pxa: allow building palm27x without pxafb To: Arnd Bergmann X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20111007_021922_204484_13889F5F X-CRM114-Status: GOOD ( 22.47 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eric.y.miao[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Russell King - ARM Linux , linux-kernel@vger.kernel.org, Jason Chagas , Haojian Zhuang , Marek Vasut , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On Sun, Oct 2, 2011 at 4:03 AM, Arnd Bergmann wrote: > The frame buffer device is defined conditionally on whether the > driver is configured. However, the #ifdef guard around the > declaration of palm27x_lcd_init also removes the visibility > of the lcd mode declarations, which need to be available in > order to build correctly, even if they are not defined in the > end. > > Signed-off-by: Arnd Bergmann > --- >  arch/arm/mach-pxa/include/mach/palm27x.h |    2 +- >  1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/mach-pxa/include/mach/palm27x.h b/arch/arm/mach-pxa/include/mach/palm27x.h > index 0a5e5ea..030a916 100644 > --- a/arch/arm/mach-pxa/include/mach/palm27x.h > +++ b/arch/arm/mach-pxa/include/mach/palm27x.h > @@ -27,10 +27,10 @@ extern void __init palm27x_pm_init(unsigned long str_base); >  static inline void palm27x_pm_init(unsigned long str_base) {} >  #endif > > -#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) >  extern struct pxafb_mode_info palm_320x480_lcd_mode; >  extern struct pxafb_mode_info palm_320x320_lcd_mode; >  extern struct pxafb_mode_info palm_320x320_new_lcd_mode; > +#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) >  extern void __init palm27x_lcd_init(int power, >                                        struct pxafb_mode_info *mode); >  #else > -- > 1.7.5.4 Marek and I actually came up with a patch to fix this as below, this way to cover the declarations of those modes in the CONFIG_FB_PXA as well. commit e227e88ae46e921f608b056e27e1d8704b7d12fa Author: Eric Miao Date: Sun Sep 11 16:56:58 2011 +0800 ARM: pxa: fix building error by palm27x_lcd_init() when FB_PXA not defined Cc: Marek Vasut Signed-off-by: Eric Miao > > diff --git a/arch/arm/mach-pxa/include/mach/palm27x.h b/arch/arm/mach-pxa/include/mach/palm27x.h index 0a5e5ea..f80bbe2 100644 --- a/arch/arm/mach-pxa/include/mach/palm27x.h +++ b/arch/arm/mach-pxa/include/mach/palm27x.h @@ -34,7 +34,7 @@ extern struct pxafb_mode_info palm_320x320_new_lcd_mode; extern void __init palm27x_lcd_init(int power, struct pxafb_mode_info *mode); #else -static inline void palm27x_lcd_init(int power, struct pxafb_mode_info *mode) {} +#define palm27x_lcd_init(power, mode) do {} while (0) #endif #if defined(CONFIG_USB_GADGET_PXA27X) || \