From 279fcd48c4a426050422b2d196fd99c2b5ae7d71 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Wed, 24 Mar 2010 11:59:38 +0100 Subject: OMAP: DSS2: Fix device disable when driver is not loaded Only call driver disable when device isn't already disabled, which also handles the driver not loaded case. Signed-off-by: Jani Nikula Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/video/omap2/dss') diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index 71389630b108..ef8c8529dda2 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; } -- cgit v1.2.3