From patchwork Sat Oct 8 09:50:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [20/26] ARM: pxa: select FB_PXA on saar and tevorevb Date: Fri, 07 Oct 2011 23:50:31 -0000 From: Eric Miao X-Patchwork-Id: 118514 Message-Id: To: Arnd Bergmann Cc: Jason Chagas , Russell King - ARM Linux , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Haojian Zhuang On Sun, Oct 2, 2011 at 4:03 AM, Arnd Bergmann wrote: > The saar and tevorevb platforms call pxafb_smart_flush from board > code, and that function is defined in the framebuffer code, so it > cannot be disabled. > > Signed-off-by: Arnd Bergmann > --- >  arch/arm/mach-pxa/Kconfig |    4 ++++ >  1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig > index bb310d0..cd94f2f 100644 > --- a/arch/arm/mach-pxa/Kconfig > +++ b/arch/arm/mach-pxa/Kconfig > @@ -61,11 +61,15 @@ config MACH_TAVOREVB >        bool "PXA930 Evaluation Board (aka TavorEVB)" >        select PXA3xx >        select CPU_PXA930 > +       select FB_PXA > +       select FB > >  config MACH_SAAR >        bool "PXA930 Handheld Platform (aka SAAR)" >        select PXA3xx >        select CPU_PXA930 > +       select FB_PXA > +       select FB Hi Arnd, The option really matters is FB_PXA_SMARTPANEL, which adds support for the display driver to control an external "smart" LCD panel. And how about the patch below to fix this - as normal, make empty functions when not enabled? diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h index 01a45ac..486b4c5 100644 --- a/arch/arm/mach-pxa/include/mach/pxafb.h +++ b/arch/arm/mach-pxa/include/mach/pxafb.h @@ -158,5 +158,18 @@ struct pxafb_mach_info { void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); unsigned long pxafb_get_hsync_time(struct device *dev); +#ifdef CONFIG_FB_PXA_SMARTPANEL extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); extern int pxafb_smart_flush(struct fb_info *info); +#else +static inline int pxafb_smart_queue(struct fb_info *info, + uint16_t *cmds, int n) +{ + return 0; +} + +static inline int pxafb_smart_flush(struct fb_info *info) +{ + return 0; +} +#endif diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 0f4e8c9..389530b 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c @@ -1309,16 +1309,6 @@ static int pxafb_smart_init(struct pxafb_info *fbi) return 0; } #else -int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int n_cmds) -{ - return 0; -} - -int pxafb_smart_flush(struct fb_info *info) -{ - return 0; -} - static inline int pxafb_smart_init(struct pxafb_info *fbi) { return 0; } #endif /* CONFIG_FB_PXA_SMARTPANEL */