]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/video/omap2/displays/panel-tpo-td043mtea1.c
OMAP: DSS2: don't power off a panel twice
[net-next-2.6.git] / drivers / video / omap2 / displays / panel-tpo-td043mtea1.c
index e866e76b13d02bfc746656c33d1167d94d7d84fb..dbe9d43b4850d80c7218719528ce3c57c473b944 100644 (file)
@@ -269,6 +269,9 @@ static int tpo_td043_power_on(struct omap_dss_device *dssdev)
        int nreset_gpio = dssdev->reset_gpio;
        int r;
 
+       if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
+               return 0;
+
        r = omapdss_dpi_display_enable(dssdev);
        if (r)
                goto err0;
@@ -308,6 +311,9 @@ static void tpo_td043_power_off(struct omap_dss_device *dssdev)
        struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev);
        int nreset_gpio = dssdev->reset_gpio;
 
+       if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
+               return;
+
        tpo_td043_write(tpo_td043->spi, 3,
                        TPO_R03_VAL_STANDBY | TPO_R03_EN_PWM);