video: tegra: host: api clean-up
[linux-2.6.git] / drivers / video / tegra / host / nvhost_acm.c
index 318f209..f2a61a9 100644 (file)
@@ -394,41 +394,9 @@ static int is_module_idle(struct nvhost_device *dev)
        return (count == 0);
 }
 
-static void debug_not_idle(struct nvhost_master *host)
-{
-       int i;
-       bool lock_released = true;
-
-       for (i = 0; i < host->nb_channels; i++) {
-               struct nvhost_device *dev = host->channels[i].dev;
-               mutex_lock(&dev->lock);
-               if (dev->name)
-                       dev_warn(&host->dev->dev,
-                               "tegra_grhost: %s: refcnt %d\n", dev->name,
-                               dev->refcount);
-               mutex_unlock(&dev->lock);
-       }
-
-       for (i = 0; i < host->syncpt.nb_mlocks; i++) {
-               int c = atomic_read(&host->syncpt.lock_counts[i]);
-               if (c) {
-                       dev_warn(&host->dev->dev,
-                               "tegra_grhost: lock id %d: refcnt %d\n",
-                               i, c);
-                       lock_released = false;
-               }
-       }
-       if (lock_released)
-               dev_dbg(&host->dev->dev, "tegra_grhost: all locks released\n");
-}
-
-int nvhost_module_suspend(struct nvhost_device *dev, bool system_suspend)
+int nvhost_module_suspend(struct nvhost_device *dev)
 {
        int ret;
-       struct nvhost_master *host = nvhost_get_host(dev);
-
-       if (system_suspend && !is_module_idle(dev))
-               debug_not_idle(host);
 
        ret = wait_event_timeout(dev->idle_wq, is_module_idle(dev),
                        ACM_SUSPEND_WAIT_FOR_IDLE_TIMEOUT);
@@ -438,9 +406,6 @@ int nvhost_module_suspend(struct nvhost_device *dev, bool system_suspend)
                return -EBUSY;
        }
 
-       if (system_suspend)
-               dev_dbg(&dev->dev, "tegra_grhost: entered idle\n");
-
        mutex_lock(&dev->lock);
        cancel_delayed_work(&dev->powerstate_down);
        to_state_powergated_locked(dev);
@@ -459,7 +424,7 @@ void nvhost_module_deinit(struct nvhost_device *dev)
        if (dev->deinit)
                dev->deinit(dev);
 
-       nvhost_module_suspend(dev, false);
+       nvhost_module_suspend(dev);
        for (i = 0; i < dev->num_clks; i++)
                clk_put(dev->clk[i]);
        dev->powerstate = NVHOST_POWER_STATE_DEINIT;