From 3e6ad4d3bbace28a2077ef678dcb041bd20bd120 Mon Sep 17 00:00:00 2001 From: Erik Gilling Date: Thu, 7 Oct 2010 15:45:49 -0700 Subject: [PATCH] video: tegra: lock around DC suspend/resume Change-Id: I9c134a2417106538b15cc1cfd615cfb65573e878 Signed-off-by: Erik Gilling --- drivers/video/tegra/dc/dc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index 16e6a454336d..da114d8502af 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c @@ -1066,8 +1066,10 @@ static int tegra_dc_suspend(struct nvhost_device *ndev, pm_message_t state) dev_info(&ndev->dev, "suspend\n"); + mutex_lock(&dc->lock); if (dc->enabled) _tegra_dc_disable(dc); + mutex_unlock(&dc->lock); return 0; } @@ -1078,8 +1080,10 @@ static int tegra_dc_resume(struct nvhost_device *ndev) dev_info(&ndev->dev, "resume\n"); + mutex_lock(&dc->lock); if (dc->enabled) _tegra_dc_enable(dc); + mutex_unlock(&dc->lock); return 0; } -- 2.34.1