Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3b8c375 authored by Rom Lemarchand's avatar Rom Lemarchand Committed by Mitchel Humpherys
Browse files

ion: change ion_user_handle_t definition to int



Turn ion_user_handle_t to int. This change reflects the underlying type
returned by the ion driver.

Change-Id: I40390dae8138327769510525bf62e55877a4b37d
Signed-off-by: default avatarRom Lemarchand <romlem@google.com>
Git-commit: dcd2da8015c7ac2da6f57fc0d8c15b80e44c4aed
Git-repo: http://android.googlesource.com/kernel/common/


[mitchelh@codeaurora.org: made changes to file in different location
 since we've already done the uapi split. Also, one function name was
 different due to some necessary patch re-ordering.]
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent d59f60c4
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1341,7 +1341,7 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
		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);
@@ -1357,7 +1357,7 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
		if (copy_from_user(&data, (void __user *)arg,
				   sizeof(struct ion_handle_data)))
			return -EFAULT;
		handle = ion_handle_get_by_id(client, (int)data.handle);
		handle = ion_handle_get_by_id(client, data.handle);
		if (IS_ERR(handle))
			return PTR_ERR(handle);
		ion_free(client, handle);
@@ -1372,7 +1372,7 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
		if (copy_from_user(&data, (void __user *)arg, sizeof(data)))
			return -EFAULT;

		handle = ion_handle_get_by_id(client, (int)data.handle);
		handle = ion_handle_get_by_id(client, data.handle);
		if (IS_ERR(handle))
			return PTR_ERR(handle);
		data.fd = ion_share_dma_buf_fd(client, handle);
@@ -1395,7 +1395,7 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
		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)))
+2 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 * include/linux/ion.h
 *
 * Copyright (C) 2011 Google, Inc.
 * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -21,6 +21,7 @@
#include <linux/err.h>
#include <uapi/linux/ion.h>

struct ion_handle;
struct ion_device;
struct ion_heap;
struct ion_mapper;
+1 −2
Original line number Diff line number Diff line
@@ -20,8 +20,7 @@
#include <linux/ioctl.h>
#include <linux/types.h>

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