Skip to content

Commit

Permalink
OMAP: DSS2: Fix device disable when driver is not loaded
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jani Nikula authored and Tomi Valkeinen committed May 18, 2010
1 parent 35bc42c commit 279fcd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/video/omap2/dss/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 279fcd4

Please sign in to comment.