fbdev: omap/lcd: Make callbacks optional

Most OMAP FB LCD drivers don't have anything to do in their panel
callbacks. This leads to a large set of empty boilerplate functions in the
panel drivers. Make those callbacks optional by checking if they are set
before calling them. This allows those boilerplate functions to be removed.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
Lars-Peter Clausen
2017-01-30 17:39:49 +01:00
committed by Bartlomiej Zolnierkiewicz
parent b2c1e8a75b
commit 561eb9d09a
10 changed files with 20 additions and 183 deletions

View File

@@ -69,11 +69,6 @@ static void innovator1610_panel_disable(struct lcd_panel *panel)
gpio_set_value(15, 0);
}
static unsigned long innovator1610_panel_get_caps(struct lcd_panel *panel)
{
return 0;
}
static struct lcd_panel innovator1610_panel = {
.name = "inn1610",
.config = OMAP_LCDC_PANEL_TFT,
@@ -95,7 +90,6 @@ static struct lcd_panel innovator1610_panel = {
.cleanup = innovator1610_panel_cleanup,
.enable = innovator1610_panel_enable,
.disable = innovator1610_panel_disable,
.get_caps = innovator1610_panel_get_caps,
};
static int innovator1610_panel_probe(struct platform_device *pdev)