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;
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,
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.
void nvmap_client_put(struct nvmap_client *c);
-struct nvmap_handle *unmarshal_user_id(u32 id);
+struct nvmap_handle *unmarshal_user_handle(__u32 handle);
static inline void nvmap_flush_tlb_kernel_page(unsigned long kaddr)
{