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
@@ -29,16 +29,6 @@
|
||||
|
||||
#include "omapfb.h"
|
||||
|
||||
static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
|
||||
{
|
||||
/* gpio2 was allocated in board init */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void osk_panel_cleanup(struct lcd_panel *panel)
|
||||
{
|
||||
}
|
||||
|
||||
static int osk_panel_enable(struct lcd_panel *panel)
|
||||
{
|
||||
/* configure PWL pin */
|
||||
@@ -68,11 +58,6 @@ static void osk_panel_disable(struct lcd_panel *panel)
|
||||
gpio_set_value(2, 0);
|
||||
}
|
||||
|
||||
static unsigned long osk_panel_get_caps(struct lcd_panel *panel)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct lcd_panel osk_panel = {
|
||||
.name = "osk",
|
||||
.config = OMAP_LCDC_PANEL_TFT,
|
||||
@@ -90,11 +75,8 @@ static struct lcd_panel osk_panel = {
|
||||
.vbp = 0,
|
||||
.pcd = 12,
|
||||
|
||||
.init = osk_panel_init,
|
||||
.cleanup = osk_panel_cleanup,
|
||||
.enable = osk_panel_enable,
|
||||
.disable = osk_panel_disable,
|
||||
.get_caps = osk_panel_get_caps,
|
||||
};
|
||||
|
||||
static int osk_panel_probe(struct platform_device *pdev)
|
||||
|
Reference in New Issue
Block a user