]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
OMAPDSS: fix bogus WARN_ON in dss_runtime_put()
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 23 May 2012 14:02:26 +0000 (17:02 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 4 Jun 2012 08:04:41 +0000 (11:04 +0300)
pm_runtime_put_sync() in dss_runtime_put() returns -EBUSY when any child
of dss is still enabled. This happens, for example, when a display
output is enabled and one dumps the clocks via debugfs. This causes
dss_runtime_get & put to be called.

While I couldn't find anything about this in the documentation and it
wasn't immediately clear from runtime_pm code, it looks to me that
pm_runtime_put_sync() returns -EBUSY to inform that things went fine,
but the device could not be turned off as there are still child devices
that are enabled. This is not a problem.

This patch skips the WARN_ON if pm_runtime_put_sync() returns -EBUSY.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dss.c

index 6ea1ff149f6f08cf3311dc3c73341fca59372063..770632359a176b74bd2b62f78bc83a3ac966cbd0 100644 (file)
@@ -731,7 +731,7 @@ static void dss_runtime_put(void)
        DSSDBG("dss_runtime_put\n");
 
        r = pm_runtime_put_sync(&dss.pdev->dev);
-       WARN_ON(r < 0);
+       WARN_ON(r < 0 && r != -EBUSY);
 }
 
 /* DEBUGFS */