summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dsi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2009-12-08 16:30:24 +0100
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-08 14:32:19 +0100
commit7475e44246e8a7c435a7ed8fe1e94fc8898685d9 (patch)
tree43b5322121e82a09c2507d2b85b7b9ed6cf2ef99 /drivers/video/omap2/dss/dsi.c
parentOMAP: DSS2: Collect interrupt statistics (diff)
downloadlinux-7475e44246e8a7c435a7ed8fe1e94fc8898685d9.tar.xz
linux-7475e44246e8a7c435a7ed8fe1e94fc8898685d9.zip
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 <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/dss/dsi.c')
-rw-r--r--drivers/video/omap2/dss/dsi.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 03f85df70749..e32a53c0889f 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;
}