diff options
Diffstat (limited to 'arch/arm/plat-omap/fb.c')
-rw-r--r-- | arch/arm/plat-omap/fb.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index 45f35c983f4..24e62693b80 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c @@ -37,6 +37,7 @@ #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) +static bool omapfb_lcd_configured; static struct omapfb_platform_data omapfb_config; static u64 omap_fb_dma_mask = ~(u32)0; @@ -52,16 +53,21 @@ static struct platform_device omap_fb_device = { .num_resources = 0, }; -static int __init omap_init_fb(void) +void __init omapfb_set_lcd_config(const struct omap_lcd_config *config) { - const struct omap_lcd_config *conf; + omapfb_config.lcd = *config; + omapfb_lcd_configured = true; +} - conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config); - if (conf == NULL) +static int __init omap_init_fb(void) +{ + /* + * If the board file has not set the lcd config with + * omapfb_set_lcd_config(), don't bother registering the omapfb device + */ + if (!omapfb_lcd_configured) return 0; - omapfb_config.lcd = *conf; - return platform_device_register(&omap_fb_device); } @@ -90,4 +96,8 @@ static int __init omap_init_fb(void) arch_initcall(omap_init_fb); +#else + +void __init omapfb_set_lcd_config(omap_lcd_config *config) { } + #endif |