summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/uapi
diff options
context:
space:
mode:
authorLaura Abbott2017-04-18 20:27:07 +0200
committerGreg Kroah-Hartman2017-04-18 20:43:14 +0200
commitb0c7cb2623ede9823850945ba1e9eb442fd668a7 (patch)
treebd9cb1a4ec765f0cc1778082f4a961ddebf8c6d9 /drivers/staging/android/uapi
parentstaging: android: ion: Stop butchering the DMA address (diff)
downloadkernel-qcow2-linux-b0c7cb2623ede9823850945ba1e9eb442fd668a7.tar.gz
kernel-qcow2-linux-b0c7cb2623ede9823850945ba1e9eb442fd668a7.tar.xz
kernel-qcow2-linux-b0c7cb2623ede9823850945ba1e9eb442fd668a7.zip
staging: android: ion: Break the ABI in the name of forward progress
Several of the Ion ioctls were designed in such a way that they necessitate compat ioctls. We're breaking a bunch of other ABIs and cleaning stuff up anyway so let's follow the ioctl guidelines and clean things up while everyone is busy converting things over anyway. As part of this, also remove the useless alignment field from the allocation structure. Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/uapi')
-rw-r--r--drivers/staging/android/uapi/ion.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
index abd72fda732a..bba1c47dac5c 100644
--- a/drivers/staging/android/uapi/ion.h
+++ b/drivers/staging/android/uapi/ion.h
@@ -20,8 +20,6 @@
#include <linux/ioctl.h>
#include <linux/types.h>
-typedef int ion_user_handle_t;
-
/**
* enum ion_heap_types - list of all possible types of heaps
* @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc
@@ -76,7 +74,6 @@ enum ion_heap_type {
/**
* struct ion_allocation_data - metadata passed from userspace for allocations
* @len: size of the allocation
- * @align: required alignment of the allocation
* @heap_id_mask: mask of heap ids to allocate from
* @flags: flags passed to heap
* @handle: pointer that will be populated with a cookie to use to
@@ -85,11 +82,11 @@ enum ion_heap_type {
* Provided by userspace as an argument to the ioctl
*/
struct ion_allocation_data {
- size_t len;
- size_t align;
- unsigned int heap_id_mask;
- unsigned int flags;
- ion_user_handle_t handle;
+ __u64 len;
+ __u32 heap_id_mask;
+ __u32 flags;
+ __u32 handle;
+ __u32 unused;
};
/**
@@ -103,8 +100,8 @@ struct ion_allocation_data {
* provides the file descriptor and the kernel returns the handle.
*/
struct ion_fd_data {
- ion_user_handle_t handle;
- int fd;
+ __u32 handle;
+ __u32 fd;
};
/**
@@ -112,7 +109,7 @@ struct ion_fd_data {
* @handle: a handle
*/
struct ion_handle_data {
- ion_user_handle_t handle;
+ __u32 handle;
};
#define MAX_HEAP_NAME 32