[PATCH 09/10] staging/android: add flags member to sync ioctl structs

Gustavo Padovan
2016-01-29T21:21:17Z

Play safe and add flags member to all structs. So we don't need to
break API or create new IOCTL in the future if new features that requires
flags arises.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
drivers/staging/android/uapi/sync.h | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index b00f0eb..45921f6 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -19,11 +19,13 @@
* @fd2: file descriptor of second fence
* @name: name of new fence
* @fence: returns the fd of the new fence to userspace
+ * @flags: merge_data flags
*/
struct sync_merge_data {
__s32 fd2; /* fd of second fence */
char name[32]; /* name of new fence */
__s32 fence; /* fd on newly created fence */
+ __u32 flags;
};

/**
@@ -31,12 +33,14 @@ struct sync_merge_data {
* @obj_name: name of parent sync_timeline
* @driver_name: name of driver implementing the parent
* @status: status of the fence 0:active 1:signaled <0:error
+ * @flags: fence_info flags
* @timestamp_ns: timestamp of status change in nanoseconds
*/
struct fence_info {
char obj_name[32];
char driver_name[32];
__s32 status;
+ __u32 flags;
__u64 timestamp_ns;
};

@@ -47,6 +51,7 @@ struct fence_info {
* userspace including pt_info.
* @name: name of fence
* @status: status of fence. 1: signaled 0:active <0:error
+ * @flags: sync_file_info flags
* @num_fences number of fences in the sync_file
* @fence_info: a fence_info struct for every fence in the sync_file
*/
@@ -54,6 +59,7 @@ struct sync_file_info {
__u32 len;
char name[32];
__s32 status;
+ __u32 flags;
__u32 num_fences;

__u64 *fence_info;
--
2.5.0