diff options
author | Xinyu Chen <xinyu.chen@freescale.com> | 2012-08-07 10:30:29 +0800 |
---|---|---|
committer | Xinyu Chen <xinyu.chen@freescale.com> | 2012-08-07 10:32:13 +0800 |
commit | 511f74fdef926a8e26d5aaa64135a4745a3e65fa (patch) | |
tree | a524bd0b37f002e5d3b4cef7be01ec732542bdd3 /include | |
parent | 6c65604f0fe6e60b50bb204fc05a0134f8ced60b (diff) |
ENGR00219578 ion: refine the ioctl of ION_IOC_PHYS
The ioctl should return 0 when successful.
And the physical address is returned by
the parameter structures.
Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ion.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/ion.h b/include/linux/ion.h index 22b9d621d299..2cc8e0c7d096 100644 --- a/include/linux/ion.h +++ b/include/linux/ion.h @@ -265,6 +265,19 @@ struct ion_fd_data { }; /** + * struct ion_phys_data - passed to/from userspace for a handle/phys addr pair + * @handle: a handle + * @phys: a return physcial address + * + * For ION_IOC_PHYS ioctl + * the phys return the ion phys address + */ +struct ion_phys_data { + struct ion_handle *handle; + unsigned long phys; +}; + +/** * struct ion_handle_data - a handle passed to/from the kernel * @handle: a handle */ @@ -347,6 +360,6 @@ struct ion_custom_data { * Takes an ion_fd_data struct with the handle field populated with a valid * opaque handle. Returns the address */ -#define ION_IOC_PHYS _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data) +#define ION_IOC_PHYS _IOWR(ION_IOC_MAGIC, 7, struct ion_phys_data) #endif /* _LINUX_ION_H */ |