summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorManeet Singh <mmaneetsingh@nvidia.com>2014-09-11 17:53:42 -0700
committerWinnie Hsu <whsu@nvidia.com>2014-09-26 10:24:41 -0700
commit729cdd9d85f7fe4ab63a20ec18526e3f1c550e74 (patch)
treeadce7b6a1dcdd58f070110c83d6ff48a1cb614f5 /drivers/video
parent9c595943ba23bfe46640b75fcf6c038f26bd32d8 (diff)
video: tegra: nvmap: cleanup redundant functions
Removed redundant function unmarshal_user_id() and replaced it with unmarshal_user_handle() which it internally calls without any other changes. Bug 1553082 Change-Id: I7d998966c593f11a3322b0503ef11311fc1ae5e7 Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com> Reviewed-on: http://git-master/r/498103 (cherry picked from commit 4880b6c2bdf5b10e4a71b5b79e7878343b9e7e3b) Reviewed-on: http://git-master/r/538985 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/tegra/nvmap/nvmap_dmabuf.c2
-rw-r--r--drivers/video/tegra/nvmap/nvmap_handle.c2
-rw-r--r--drivers/video/tegra/nvmap/nvmap_ioctl.c14
-rw-r--r--drivers/video/tegra/nvmap/nvmap_priv.h2
4 files changed, 5 insertions, 15 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_dmabuf.c b/drivers/video/tegra/nvmap/nvmap_dmabuf.c
index 162e4346454c..6f47c498c33d 100644
--- a/drivers/video/tegra/nvmap/nvmap_dmabuf.c
+++ b/drivers/video/tegra/nvmap/nvmap_dmabuf.c
@@ -714,7 +714,7 @@ int nvmap_ioctl_share_dmabuf(struct file *filp, void __user *arg)
if (copy_from_user(&op, (void __user *)arg, sizeof(op)))
return -EFAULT;
- handle = unmarshal_user_id(op.id);
+ handle = unmarshal_user_handle(op.id);
if (!handle)
return -EINVAL;
diff --git a/drivers/video/tegra/nvmap/nvmap_handle.c b/drivers/video/tegra/nvmap/nvmap_handle.c
index c3587c3f6d14..dda4cb66ad48 100644
--- a/drivers/video/tegra/nvmap/nvmap_handle.c
+++ b/drivers/video/tegra/nvmap/nvmap_handle.c
@@ -440,7 +440,7 @@ EXPORT_SYMBOL(nvmap_free_handle);
void nvmap_free_handle_user_id(struct nvmap_client *client,
unsigned long user_id)
{
- nvmap_free_handle(client, unmarshal_user_id(user_id));
+ nvmap_free_handle(client, unmarshal_user_handle(user_id));
}
static void add_handle_ref(struct nvmap_client *client,
diff --git a/drivers/video/tegra/nvmap/nvmap_ioctl.c b/drivers/video/tegra/nvmap/nvmap_ioctl.c
index d9853e179f85..dc319107786a 100644
--- a/drivers/video/tegra/nvmap/nvmap_ioctl.c
+++ b/drivers/video/tegra/nvmap/nvmap_ioctl.c
@@ -47,26 +47,16 @@ static ssize_t rw_handle(struct nvmap_client *client, struct nvmap_handle *h,
unsigned long sys_stride, unsigned long elem_size,
unsigned long count);
-static struct nvmap_handle *fd_to_handle_id(int handle)
+struct nvmap_handle *unmarshal_user_handle(__u32 handle)
{
struct nvmap_handle *h;
- h = nvmap_get_id_from_dmabuf_fd(NULL, handle);
+ h = nvmap_get_id_from_dmabuf_fd(NULL, (int)handle);
if (!IS_ERR(h))
return h;
return 0;
}
-static struct nvmap_handle *unmarshal_user_handle(__u32 handle)
-{
- return fd_to_handle_id((int)handle);
-}
-
-struct nvmap_handle *unmarshal_user_id(u32 id)
-{
- return unmarshal_user_handle(id);
-}
-
/*
* marshal_id/unmarshal_id are for get_id/handle_from_id.
* These are added to support using Fd's for handle.
diff --git a/drivers/video/tegra/nvmap/nvmap_priv.h b/drivers/video/tegra/nvmap/nvmap_priv.h
index 5ce3db32384c..49ee2e7ad7d4 100644
--- a/drivers/video/tegra/nvmap/nvmap_priv.h
+++ b/drivers/video/tegra/nvmap/nvmap_priv.h
@@ -405,7 +405,7 @@ struct nvmap_client *nvmap_client_get(struct nvmap_client *client);
void nvmap_client_put(struct nvmap_client *c);
-struct nvmap_handle *unmarshal_user_id(u32 id);
+struct nvmap_handle *unmarshal_user_handle(__u32 handle);
/* MM definitions. */
extern size_t cache_maint_inner_threshold;