arm: tegra: dc: corrct order to enable/disable dc irq
[linux-2.6.git] / drivers / video / tegra / dc / dc.c
index d01df2f..ed54e9e 100644 (file)
@@ -1875,13 +1875,6 @@ static int tegra_dc_probe(struct nvhost_device *ndev,
                dc->ext = NULL;
        }
 
-       mutex_lock(&dc->lock);
-       if (dc->pdata->flags & TEGRA_DC_FLAG_ENABLED) {
-               _tegra_dc_set_default_videomode(dc);
-               dc->enabled = _tegra_dc_enable(dc);
-       }
-       mutex_unlock(&dc->lock);
-
        /* interrupt handler must be registered before tegra_fb_register() */
        if (request_irq(irq, tegra_dc_irq, 0,
                        dev_name(&ndev->dev), dc)) {
@@ -1889,6 +1882,14 @@ static int tegra_dc_probe(struct nvhost_device *ndev,
                ret = -EBUSY;
                goto err_put_emc_clk;
        }
+       disable_dc_irq(irq);
+
+       mutex_lock(&dc->lock);
+       if (dc->pdata->flags & TEGRA_DC_FLAG_ENABLED) {
+               _tegra_dc_set_default_videomode(dc);
+               dc->enabled = _tegra_dc_enable(dc);
+       }
+       mutex_unlock(&dc->lock);
 
        tegra_dc_create_debugfs(dc);