diff options
author | Archit Taneja <archit@ti.com> | 2010-10-22 17:22:03 +0530 |
---|---|---|
committer | Samreen <samreen@ti.com> | 2010-10-29 16:02:54 +0530 |
commit | 80b87dcb1b6167f303e617fdb7c70d814b2468d5 (patch) | |
tree | 0709d8db8e4e1fd445c944d0b157104d35b5e50f | |
parent | 98f74d834561525daabd649ca5aeffeac9924226 (diff) |
DSS2: Fix: Take positive values of pm_runtime_get_sync as a successful return value
Only negative return values for pm_runtime_get_sync represent erroneous behavior.
If pm_runtime_get_sync returns a positive value it doesn't that the call didn't go successfully.
This is fixed for dss_mainclk_enable()
Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/display.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index b1c19f045533..d2b0b690194d 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c @@ -672,7 +672,7 @@ int dss_mainclk_state_enable(void) return -EINVAL; } else { r = dss_mainclk_enable(); - if (!r) + if (r >= 0) restore_all_ctx(); return 0; } diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index b48b804efc46..a9f61bd038ec 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -152,7 +152,7 @@ int dss_mainclk_enable() if (!dss.mainclk_state) { ret = pm_runtime_get_sync(&dss.pdev->dev); - if (!ret) + if (ret >= 0) dss.mainclk_state = true; } |