From patchwork Tue Jul 15 08:39:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4551831 Return-Path: X-Original-To: patchwork-linux-fbdev@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 E24779F1D6 for ; Tue, 15 Jul 2014 08:41:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EBF4F2012F for ; Tue, 15 Jul 2014 08:41:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15A2A20120 for ; Tue, 15 Jul 2014 08:41:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757100AbaGOIlH (ORCPT ); Tue, 15 Jul 2014 04:41:07 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:62409 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757521AbaGOIkn (ORCPT ); Tue, 15 Jul 2014 04:40:43 -0400 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue003) with ESMTP (Nemesis) id 0LeQDB-1WmBmt0M5l-00qEGH; Tue, 15 Jul 2014 10:39:58 +0200 From: Arnd Bergmann To: Tomi Valkeinen Cc: linus.walleij@linaro.org, Russell King , linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, Jean-Christophe Plagniol-Villard Subject: PATCH] video: fix up versatile CLCD helper move Date: Tue, 15 Jul 2014 10:39:57 +0200 Message-ID: <9561883.zqovrcBa4A@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V02:K0:I0csw1SF0d5cKyJz0A922TWW2Xh1IEOSY8UGVjN5ef9 Nv2yB73k9SksMqfe5FMc7Cn/j9cKABt8P4XvCKwUzAzv+mWGDD yb2s6msn47JWcBidrrneTK9oTKoubE10OKfoN9wBSMsB4PG5Oc AA4tocuEqc0ulTpbwqSY2oQAytqVfm+rxuo2C8hMiYO3rVSJSM R2Y+RaBGo37KqVLgi1TdGw3XbQI273FkPS+dlx+5afTh2c6E6Q 82B+ZNVPoCyPQPde3eee8sfQyfhd9CDZMuvFCwIot4kkX/4SiH 0ufgtQMD2cwoEMPuorOpi2PcfDnvpOCr1Ku2cxvJd45s0wwE1s LFuyS60vvOlcqrWHaa/Q= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 11c32d7b6274cb0f ("video: move Versatile CLCD helpers") moved files out of the plat-versatile directory but in the process got a few of the dependencies wrong: - If CONFIG_FB is not set, the file no longer gets built, resulting in a link error - If CONFIG_FB or CONFIG_FB_ARMCLCD are disabled, we also get a Kconfig warning for incorrect dependencies due to the symbol being 'select'ed from the platform Kconfig. - When the file is not built, we also get a link error for missing symbols. This patch should fix all three, by removing the 'select' statements, changing the Kconfig description of the symbol to be enabled in exactly the right configurations, and adding inline stub functions for the case when the framebuffer driver is disabled. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index fceb014c54a1..76e0d6752bd8 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -336,7 +336,6 @@ config ARCH_VERSATILE select HAVE_MACH_CLKDEV select ICST select PLAT_VERSATILE - select PLAT_VERSATILE_CLCD select PLAT_VERSATILE_CLOCK select VERSATILE_FPGA_IRQ help diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index 3b02ba4e7094..4b7649d59bf6 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig @@ -9,7 +9,6 @@ config ARCH_REALVIEW select GPIO_PL061 if GPIOLIB select ICST select PLAT_VERSATILE - select PLAT_VERSATILE_CLCD help This enables support for ARM Ltd RealView boards. diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index d8b9330f896a..e9166dfc4756 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -13,7 +13,6 @@ menuconfig ARCH_VEXPRESS select ICST select NO_IOPORT_MAP select PLAT_VERSATILE - select PLAT_VERSATILE_CLCD select POWER_RESET select POWER_RESET_VEXPRESS select POWER_SUPPLY diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index e2dd9b493580..a16efe729988 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -292,10 +292,8 @@ config FB_ARMCLCD # Helper logic selected only by the ARM Versatile platform family. config PLAT_VERSATILE_CLCD - depends on FB_ARMCLCD - depends on (PLAT_VERSATILE || ARCH_INTEGRATOR) - default y - bool + def_bool ARCH_VERSATILE || ARCH_REALVIEW || ARCH_VEXPRESS + depends on FB_ARMCLCD && FB=y config FB_ACORN bool "Acorn VIDC support" diff --git a/include/linux/platform_data/video-clcd-versatile.h b/include/linux/platform_data/video-clcd-versatile.h index 6bb6a1d2019b..09ccf182af4d 100644 --- a/include/linux/platform_data/video-clcd-versatile.h +++ b/include/linux/platform_data/video-clcd-versatile.h @@ -1,9 +1,27 @@ #ifndef PLAT_CLCD_H #define PLAT_CLCD_H +#ifdef CONFIG_PLAT_VERSATILE_CLCD struct clcd_panel *versatile_clcd_get_panel(const char *); int versatile_clcd_setup_dma(struct clcd_fb *, unsigned long); int versatile_clcd_mmap_dma(struct clcd_fb *, struct vm_area_struct *); void versatile_clcd_remove_dma(struct clcd_fb *); +#else +static inline struct clcd_panel *versatile_clcd_get_panel(const char *s) +{ + return NULL; +} +static inline int versatile_clcd_setup_dma(struct clcd_fb *fb, unsigned long framesize) +{ + return -ENODEV; +} +static inline int versatile_clcd_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vm) +{ + return -ENODEV; +} +static inline void versatile_clcd_remove_dma(struct clcd_fb *fb) +{ +} +#endif #endif