summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2009-12-08 17:30:24 +0200
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-08 15:32:19 +0200
commit7475e44246e8a7c435a7ed8fe1e94fc8898685d9 (patch)
tree43b5322121e82a09c2507d2b85b7b9ed6cf2ef99 /drivers
parentdfc0fd8d8850ef11951ba6c251e06096d1b5a0bd (diff)
downloadblackbird-op-linux-7475e44246e8a7c435a7ed8fe1e94fc8898685d9.tar.gz
blackbird-op-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')
-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;
}
OpenPOWER on IntegriCloud