Turn ion_user_handle_t to int. This change reflects the underlying type
returned by the ion driver.
Signed-off-by: Rom Lemarchand <romlem@google.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (IS_ERR(handle))
return PTR_ERR(handle);
if (IS_ERR(handle))
return PTR_ERR(handle);
- data.handle = (ion_user_handle_t)handle->id;
+ data.handle = handle->id;
if (copy_to_user((void __user *)arg, &data, sizeof(data))) {
ion_free(client, handle);
if (copy_to_user((void __user *)arg, &data, sizeof(data))) {
ion_free(client, handle);
sizeof(struct ion_handle_data)))
return -EFAULT;
mutex_lock(&client->lock);
sizeof(struct ion_handle_data)))
return -EFAULT;
mutex_lock(&client->lock);
- handle = ion_uhandle_get(client, (int)data.handle);
+ handle = ion_uhandle_get(client, data.handle);
mutex_unlock(&client->lock);
if (!handle)
return -EINVAL;
mutex_unlock(&client->lock);
if (!handle)
return -EINVAL;
if (copy_from_user(&data, (void __user *)arg, sizeof(data)))
return -EFAULT;
if (copy_from_user(&data, (void __user *)arg, sizeof(data)))
return -EFAULT;
- handle = ion_uhandle_get(client, (int)data.handle);
+ handle = ion_uhandle_get(client, data.handle);
data.fd = ion_share_dma_buf_fd(client, handle);
if (copy_to_user((void __user *)arg, &data, sizeof(data)))
return -EFAULT;
data.fd = ion_share_dma_buf_fd(client, handle);
if (copy_to_user((void __user *)arg, &data, sizeof(data)))
return -EFAULT;
if (IS_ERR(handle))
ret = PTR_ERR(handle);
else
if (IS_ERR(handle))
ret = PTR_ERR(handle);
else
- data.handle = (ion_user_handle_t)handle->id;
+ data.handle = handle->id;
if (copy_to_user((void __user *)arg, &data,
sizeof(struct ion_fd_data)))
if (copy_to_user((void __user *)arg, &data,
sizeof(struct ion_fd_data)))
-struct ion_handle;
-typedef struct ion_handle *ion_user_handle_t;
+typedef int ion_user_handle_t;
/**
* enum ion_heap_types - list of all possible types of heaps
/**
* enum ion_heap_types - list of all possible types of heaps
caches must be managed manually */
#ifdef __KERNEL__
caches must be managed manually */
#ifdef __KERNEL__
struct ion_device;
struct ion_heap;
struct ion_mapper;
struct ion_device;
struct ion_heap;
struct ion_mapper;