[09/23] OMAP: DSS2: Fix device disable when driver is not loaded
diff mbox

Message ID 1274186114-26951-10-git-send-email-tomi.valkeinen@nokia.com
State New, archived
Delegated to: Tomi Valkeinen
Headers show

Commit Message

Tomi Valkeinen May 18, 2010, 12:35 p.m. UTC
None

Patch
diff mbox

diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 7138963..ef8c852 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -545,7 +545,10 @@  int dss_resume_all_devices(void)
 static int dss_disable_device(struct device *dev, void *data)
 {
 	struct omap_dss_device *dssdev = to_dss_device(dev);
-	dssdev->driver->disable(dssdev);
+
+	if (dssdev->state != OMAP_DSS_DISPLAY_DISABLED)
+		dssdev->driver->disable(dssdev);
+
 	return 0;
 }