Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fix up versatile CLCD helper move

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>

+20 -7
-2
arch/arm/Kconfig
··· 332 332 select ICST 333 333 select NEED_MACH_MEMORY_H 334 334 select PLAT_VERSATILE 335 - select PLAT_VERSATILE_CLCD 336 335 help 337 336 This enables support for ARM Ltd RealView boards. 338 337 ··· 346 347 select HAVE_MACH_CLKDEV 347 348 select ICST 348 349 select PLAT_VERSATILE 349 - select PLAT_VERSATILE_CLCD 350 350 select PLAT_VERSATILE_CLOCK 351 351 select VERSATILE_FPGA_IRQ 352 352 help
-1
arch/arm/mach-vexpress/Kconfig
··· 13 13 select ICST 14 14 select NO_IOPORT_MAP 15 15 select PLAT_VERSATILE 16 - select PLAT_VERSATILE_CLCD 17 16 select POWER_RESET 18 17 select POWER_RESET_VEXPRESS 19 18 select POWER_SUPPLY
+2 -4
drivers/video/fbdev/Kconfig
··· 292 292 293 293 # Helper logic selected only by the ARM Versatile platform family. 294 294 config PLAT_VERSATILE_CLCD 295 - depends on FB_ARMCLCD 296 - depends on (PLAT_VERSATILE || ARCH_INTEGRATOR) 297 - default y 298 - bool 295 + def_bool ARCH_VERSATILE || ARCH_REALVIEW || ARCH_VEXPRESS 296 + depends on FB_ARMCLCD && FB=y 299 297 300 298 config FB_ACORN 301 299 bool "Acorn VIDC support"
+18
include/linux/platform_data/video-clcd-versatile.h
··· 1 1 #ifndef PLAT_CLCD_H 2 2 #define PLAT_CLCD_H 3 3 4 + #ifdef CONFIG_PLAT_VERSATILE_CLCD 4 5 struct clcd_panel *versatile_clcd_get_panel(const char *); 5 6 int versatile_clcd_setup_dma(struct clcd_fb *, unsigned long); 6 7 int versatile_clcd_mmap_dma(struct clcd_fb *, struct vm_area_struct *); 7 8 void versatile_clcd_remove_dma(struct clcd_fb *); 9 + #else 10 + static inline struct clcd_panel *versatile_clcd_get_panel(const char *s) 11 + { 12 + return NULL; 13 + } 14 + static inline int versatile_clcd_setup_dma(struct clcd_fb *fb, unsigned long framesize) 15 + { 16 + return -ENODEV; 17 + } 18 + static inline int versatile_clcd_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vm) 19 + { 20 + return -ENODEV; 21 + } 22 + static inline void versatile_clcd_remove_dma(struct clcd_fb *fb) 23 + { 24 + } 25 + #endif 8 26 9 27 #endif