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 <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
This commit is contained in:
Jani Nikula 2010-03-24 11:59:38 +01:00 committed by Tomi Valkeinen
parent 35bc42c504
commit 279fcd48c4

View file

@ -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;
}