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:

committed by
Bartlomiej Zolnierkiewicz

parent
b2c1e8a75b
commit
561eb9d09a
@@ -27,16 +27,6 @@
|
||||
|
||||
#include "omapfb.h"
|
||||
|
||||
static int innovator1510_panel_init(struct lcd_panel *panel,
|
||||
struct omapfb_device *fbdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void innovator1510_panel_cleanup(struct lcd_panel *panel)
|
||||
{
|
||||
}
|
||||
|
||||
static int innovator1510_panel_enable(struct lcd_panel *panel)
|
||||
{
|
||||
__raw_writeb(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL);
|
||||
@@ -48,11 +38,6 @@ static void innovator1510_panel_disable(struct lcd_panel *panel)
|
||||
__raw_writeb(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL);
|
||||
}
|
||||
|
||||
static unsigned long innovator1510_panel_get_caps(struct lcd_panel *panel)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct lcd_panel innovator1510_panel = {
|
||||
.name = "inn1510",
|
||||
.config = OMAP_LCDC_PANEL_TFT,
|
||||
@@ -70,11 +55,8 @@ static struct lcd_panel innovator1510_panel = {
|
||||
.vbp = 0,
|
||||
.pcd = 12,
|
||||
|
||||
.init = innovator1510_panel_init,
|
||||
.cleanup = innovator1510_panel_cleanup,
|
||||
.enable = innovator1510_panel_enable,
|
||||
.disable = innovator1510_panel_disable,
|
||||
.get_caps = innovator1510_panel_get_caps,
|
||||
};
|
||||
|
||||
static int innovator1510_panel_probe(struct platform_device *pdev)
|
||||
|
Reference in New Issue
Block a user