Skip to content

Commit 9741917

Browse files
mpehdeller
authored andcommitted
fbdev: mb862xxfb: Fix defined but not used error
socrates_gc_mode is defined at the top-level but then only used inside an #ifdef CONFIG_FB_MB862XX_LIME, leading to an error with some configs: drivers/video/fbdev/mb862xx/mb862xxfbdrv.c:36:31: error: ‘socrates_gc_mode’ defined but not used 36 | static struct mb862xx_gc_mode socrates_gc_mode = { Fix it by moving socrates_gc_mode inside that ifdef, immediately prior to the only function where it's used. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 748c7eb commit 9741917

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/video/fbdev/mb862xx/mb862xxfbdrv.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@
3232
#define CARMINE_MEM_SIZE 0x8000000
3333
#define DRV_NAME "mb862xxfb"
3434

35-
#if defined(CONFIG_SOCRATES)
36-
static struct mb862xx_gc_mode socrates_gc_mode = {
37-
/* Mode for Prime View PM070WL4 TFT LCD Panel */
38-
{ "800x480", 45, 800, 480, 40000, 86, 42, 33, 10, 128, 2, 0, 0, 0 },
39-
/* 16 bits/pixel, 16MB, 133MHz, SDRAM memory mode value */
40-
16, 0x1000000, GC_CCF_COT_133, 0x4157ba63
41-
};
42-
#endif
43-
4435
/* Helpers */
4536
static inline int h_total(struct fb_var_screeninfo *var)
4637
{
@@ -666,6 +657,15 @@ static int mb862xx_gdc_init(struct mb862xxfb_par *par)
666657
return 0;
667658
}
668659

660+
#if defined(CONFIG_SOCRATES)
661+
static struct mb862xx_gc_mode socrates_gc_mode = {
662+
/* Mode for Prime View PM070WL4 TFT LCD Panel */
663+
{ "800x480", 45, 800, 480, 40000, 86, 42, 33, 10, 128, 2, 0, 0, 0 },
664+
/* 16 bits/pixel, 16MB, 133MHz, SDRAM memory mode value */
665+
16, 0x1000000, GC_CCF_COT_133, 0x4157ba63
666+
};
667+
#endif
668+
669669
static int of_platform_mb862xx_probe(struct platform_device *ofdev)
670670
{
671671
struct device_node *np = ofdev->dev.of_node;

0 commit comments

Comments
 (0)