Skip to content

Commit a79530e

Browse files
dhowellstorvalds
authored andcommitted
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>
1 parent c6d5f98 commit a79530e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/video/aty/aty128fb.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,13 @@ static int default_lcd_on = 1;
357357
static bool mtrr = true;
358358
#endif
359359

360+
#ifdef CONFIG_FB_ATY128_BACKLIGHT
360361
#ifdef CONFIG_PMAC_BACKLIGHT
361362
static int backlight = 1;
362363
#else
363364
static int backlight = 0;
364365
#endif
366+
#endif
365367

366368
/* PLL constants */
367369
struct aty128_constants {
@@ -1671,7 +1673,9 @@ static int aty128fb_setup(char *options)
16711673
default_crt_on = simple_strtoul(this_opt+4, NULL, 0);
16721674
continue;
16731675
} else if (!strncmp(this_opt, "backlight:", 10)) {
1676+
#ifdef CONFIG_FB_ATY128_BACKLIGHT
16741677
backlight = simple_strtoul(this_opt+10, NULL, 0);
1678+
#endif
16751679
continue;
16761680
}
16771681
#ifdef CONFIG_MTRR

0 commit comments

Comments
 (0)