summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/nvmap/nvmap.c
diff options
context:
space:
mode:
authorKirill Artamonov <kartamonov@nvidia.com>2011-02-15 01:07:20 +0200
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:44:52 -0800
commit040f2be385a9f8049c26835d823f15727a5a257a (patch)
tree9ea06fdc020406d1f93569f04665e2710f6c4df0 /drivers/video/tegra/nvmap/nvmap.c
parent4e01c4c6f3399b59ae263b434c43e5c366cf1d35 (diff)
video: tegra: nvmap: replace mutex with spinlock
There are places where nvmap_free_handle_id is called when interrupts are disabled and mutex cannot be used as nvmap handle lock. Original-Change-Id: Icc220fe627c08f21c677d936a54f70c818dc8e8c Reviewed-on: http://git-master/r/19489 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rb5a58e8226ad14340d1acae007d6b632960fae16
Diffstat (limited to 'drivers/video/tegra/nvmap/nvmap.c')
-rw-r--r--drivers/video/tegra/nvmap/nvmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap.c b/drivers/video/tegra/nvmap/nvmap.c
index 50714c502194..15d40467ff9b 100644
--- a/drivers/video/tegra/nvmap/nvmap.c
+++ b/drivers/video/tegra/nvmap/nvmap.c
@@ -578,9 +578,9 @@ unsigned long nvmap_handle_address(struct nvmap_client *c, unsigned long id)
h = nvmap_get_handle_id(c, id);
if (!h)
return -EPERM;
- mutex_lock(&h->lock);
+ spin_lock(&h->lock);
phys = handle_phys(h);
- mutex_unlock(&h->lock);
+ spin_unlock(&h->lock);
nvmap_handle_put(h);
return phys;