From: Tony Prisk Date: Sun, 7 Oct 2012 01:02:14 +0000 (+1300) Subject: vt8500: Fix build warning when no framebuffer selected X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a4ee7770c4a0eefda655bf1e19ba0eb48da828a6;p=linux-beck.git vt8500: Fix build warning when no framebuffer selected Check for framebuffer defines before declaring variables in vt8500.c Removes a compile-time warning about unused variables. Signed-off-by: Tony Prisk Signed-off-by: Olof Johansson --- diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c index 587ea950d08b..8d3871f110a5 100644 --- a/arch/arm/mach-vt8500/vt8500.c +++ b/arch/arm/mach-vt8500/vt8500.c @@ -77,8 +77,11 @@ static void vt8500_power_off(void) void __init vt8500_init(void) { - struct device_node *np, *fb; + struct device_node *np; +#if defined(CONFIG_FB_VT8500) || defined(CONFIG_FB_WM8505) + struct device_node *fb; void __iomem *gpio_base; +#endif #ifdef CONFIG_FB_VT8500 fb = of_find_compatible_node(NULL, NULL, "via,vt8500-fb");