aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-01-23 18:54:06 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 19:36:55 -0500
commita79530e4d8c8ef2bece88f8dab680e541162f010 (patch)
tree9104aee3bcb9996ba671572709648c374030bf4b
parentc6d5f989e14f36d5ff71a9b79a6d3c3bf06c185f (diff)
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>
-rw-r--r--drivers/video/aty/aty128fb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index 12ca031877d4..52108be69e77 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -357,11 +357,13 @@ static int default_lcd_on = 1;
357static bool mtrr = true; 357static bool mtrr = true;
358#endif 358#endif
359 359
360#ifdef CONFIG_FB_ATY128_BACKLIGHT
360#ifdef CONFIG_PMAC_BACKLIGHT 361#ifdef CONFIG_PMAC_BACKLIGHT
361static int backlight = 1; 362static int backlight = 1;
362#else 363#else
363static int backlight = 0; 364static int backlight = 0;
364#endif 365#endif
366#endif
365 367
366/* PLL constants */ 368/* PLL constants */
367struct aty128_constants { 369struct aty128_constants {
@@ -1671,7 +1673,9 @@ static int aty128fb_setup(char *options)
1671 default_crt_on = simple_strtoul(this_opt+4, NULL, 0); 1673 default_crt_on = simple_strtoul(this_opt+4, NULL, 0);
1672 continue; 1674 continue;
1673 } else if (!strncmp(this_opt, "backlight:", 10)) { 1675 } else if (!strncmp(this_opt, "backlight:", 10)) {
1676#ifdef CONFIG_FB_ATY128_BACKLIGHT
1674 backlight = simple_strtoul(this_opt+10, NULL, 0); 1677 backlight = simple_strtoul(this_opt+10, NULL, 0);
1678#endif
1675 continue; 1679 continue;
1676 } 1680 }
1677#ifdef CONFIG_MTRR 1681#ifdef CONFIG_MTRR