From: Tomi Valkeinen Date: Tue, 8 Dec 2009 15:30:24 +0000 (+0200) Subject: OMAP: DSS2: Fix crash when panel doesn't define enable_te() X-Git-Tag: v3.12-rc1~11242^2~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7475e44246e8a7c435a7ed8fe1e94fc8898685d9;p=kernel%2Fkernel-generic.git OMAP: DSS2: Fix crash when panel doesn't define enable_te() DSI driver didn't check if the panel driver actually implements enable_te(). Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 03f85df..e32a53c 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -2932,11 +2932,15 @@ static int dsi_set_update_mode(struct omap_dss_device *dssdev, static int dsi_set_te(struct omap_dss_device *dssdev, bool enable) { - int r; - r = dssdev->driver->enable_te(dssdev, enable); - /* XXX for some reason, DSI TE breaks if we don't wait here. - * Panel bug? Needs more studying */ - msleep(100); + int r = 0; + + if (dssdev->driver->enable_te) { + r = dssdev->driver->enable_te(dssdev, enable); + /* XXX for some reason, DSI TE breaks if we don't wait here. + * Panel bug? Needs more studying */ + msleep(100); + } + return r; }