aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRicardo Salveti de Araujo <ricardo.salveti@canonical.com>2011-05-05 03:07:37 -0300
committerRicardo Salveti de Araujo <ricardo.salveti@canonical.com>2011-05-16 22:52:38 -0300
commitfd21f1db102535853258a0e1a43c00d47daa26ee (patch)
tree650ba6d98b0102cc1301ac187f6901377033965f /drivers
parentfb884cd44ca187f34e3982216c207e1044f2c883 (diff)
downloadlinux-linaro-android-fd21f1db102535853258a0e1a43c00d47daa26ee.tar.gz
OMAP: DSS2: Avoid enabling panel if none is around
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/displays/panel-generic-dpi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c
index 54f1884ff5b..fdeeda158c8 100644
--- a/drivers/video/omap2/displays/panel-generic-dpi.c
+++ b/drivers/video/omap2/displays/panel-generic-dpi.c
@@ -192,6 +192,9 @@ struct panel_drv_data {
struct panel_config *panel_config;
};
+static bool generic_dpi_panel_is_detected(struct omap_dss_device *dssdev,
+ bool force);
+
static inline struct panel_generic_dpi_data
*get_panel_data(const struct omap_dss_device *dssdev)
{
@@ -302,6 +305,13 @@ static int generic_dpi_panel_enable(struct omap_dss_device *dssdev)
{
int r = 0;
+ /* Avoid enabling the panel if there is none around */
+ if (!generic_dpi_panel_is_detected(dssdev, false)) {
+ printk(KERN_ERR "Not enabling generic panel as no "
+ "connector is detected\n");
+ return 1;
+ }
+
r = generic_dpi_panel_power_on(dssdev);
if (r)
return r;