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

drivers/video/aty/aty128fb.c: fix a warning pertaining to the aty128fb backlight variable

Fix the following warning in the aty128fb driver:

drivers/video/aty/aty128fb.c:363:12: warning: 'backlight' defined but not used [-Wunused-variable]
static int backlight = 0;
^

as the variable's value is only read if CONFIG_FB_ATY128_BACKLIGHT=y. The
variable is also set if MODULE is unset[*].

[*] I wonder if the conditional wrapper around aty128fb_setup() should be
using CONFIG_MODULE rather than MODULE.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Howells and committed by
Linus Torvalds
a79530e4 c6d5f989

+4
+4
drivers/video/aty/aty128fb.c
··· 357 357 static bool mtrr = true; 358 358 #endif 359 359 360 + #ifdef CONFIG_FB_ATY128_BACKLIGHT 360 361 #ifdef CONFIG_PMAC_BACKLIGHT 361 362 static int backlight = 1; 362 363 #else 363 364 static int backlight = 0; 365 + #endif 364 366 #endif 365 367 366 368 /* PLL constants */ ··· 1673 1671 default_crt_on = simple_strtoul(this_opt+4, NULL, 0); 1674 1672 continue; 1675 1673 } else if (!strncmp(this_opt, "backlight:", 10)) { 1674 + #ifdef CONFIG_FB_ATY128_BACKLIGHT 1676 1675 backlight = simple_strtoul(this_opt+10, NULL, 0); 1676 + #endif 1677 1677 continue; 1678 1678 } 1679 1679 #ifdef CONFIG_MTRR