video: fix up versatile CLCD helper move
authorArnd Bergmann <arnd@arndb.de>
Tue, 15 Jul 2014 07:58:06 +0000 (09:58 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 23 Jul 2014 15:41:00 +0000 (17:41 +0200)
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 <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/Kconfig
arch/arm/mach-vexpress/Kconfig
drivers/video/fbdev/Kconfig
include/linux/platform_data/video-clcd-versatile.h

index c32064de77d8a6340afdfd1ead2a38b8580c2c6b..11f18a04c066b5e05c3d68e371283d73c949da83 100644 (file)
@@ -332,7 +332,6 @@ config ARCH_REALVIEW
        select ICST
        select NEED_MACH_MEMORY_H
        select PLAT_VERSATILE
-       select PLAT_VERSATILE_CLCD
        help
          This enables support for ARM Ltd RealView boards.
 
@@ -347,7 +346,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
index d8b9330f896a3edac20a11355d8b60b9a613f824..e9166dfc4756c1b9708100430a11b028976a2a9a 100644 (file)
@@ -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
index 92026d31bb488760cee1ce4623fb4b471c35cb2d..bdf4630722475e5a4e8d108bde621cfeb07e3aff 100644 (file)
@@ -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"
index 6bb6a1d2019b41e85851e6cf1ddeceb5ce423dea..09ccf182af4dc3b729d272c4ef1ce154c820c8fa 100644 (file)
@@ -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
This page took 0.029391 seconds and 5 git commands to generate.