Modify ion to use new definition of ALLOC ioctl argument
Also add ion_alloc_fd helper for when you only want a filedescriptor
and know you won't need to access this handle again by its ion_handle
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Change-Id: Ia4bae22946b0078084b62f5447fecbf261dfaa83
diff --git a/include/ion/ion.h b/include/ion/ion.h
index cafead5..78a6e2e 100644
--- a/include/ion/ion.h
+++ b/include/ion/ion.h
@@ -27,8 +27,10 @@
int ion_open();
int ion_close(int fd);
-int ion_alloc(int fd, size_t len, size_t align, unsigned int flags,
- struct ion_handle **handle);
+int ion_alloc(int fd, size_t len, size_t align, unsigned int heap_mask,
+ unsigned int flags, struct ion_handle **handle);
+int ion_alloc_fd(int fd, size_t len, size_t align, unsigned int heap_mask,
+ unsigned int flags, int *handle_fd);
int ion_free(int fd, struct ion_handle *handle);
int ion_map(int fd, struct ion_handle *handle, size_t length, int prot,
int flags, off_t offset, unsigned char **ptr, int *map_fd);