video: dsi: tegra: Improve suspend code
Animesh Kishore [Mon, 27 Jun 2011 06:56:59 +0000 (11:56 +0530)]
Add check to prevent control enter into suspend function
once dsi has already been disabled

Bug 841104

Original-Change-Id: I09b5547ea619bfa8fcfecf6ba570c65163d7eca1
Reviewed-on: http://git-master/r/38467
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Tested-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
Reviewed-by: Min-wuk Lee <mlee@nvidia.com>
Tested-by: Min-wuk Lee <mlee@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Narendra Damahe <ndamahe@nvidia.com>

Rebase-Id: R4db2f0f8e1d723d54658f4bfde3701aba25f47f1

drivers/video/tegra/dc/dsi.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 33bad83..96769f1
@@ -2012,6 +2012,9 @@ static void tegra_dc_dsi_suspend(struct tegra_dc *dc)
        tegra_dc_io_start(dc);
        mutex_lock(&dsi->lock);
 
+       if (!dsi->enabled)
+               goto fail;
+
        if (dsi->ulpm) {
                if (tegra_dsi_exit_ulpm(dsi) < 0) {
                        printk(KERN_ERR "DSI failed to exit ulpm");