]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/staging/greybus/operation.h
staging: greybus: operation: add private data with get/set accessors
[mirror_ubuntu-hirsute-kernel.git] / drivers / staging / greybus / operation.h
index 7529f01b2529203004413f9dcfffa682c8338533..bfec1e93384e6f87b621a507b159f75879a59e71 100644 (file)
@@ -105,6 +105,8 @@ struct gb_operation {
 
        int                     active;
        struct list_head        links;          /* connection->operations */
+
+       void                    *private;
 };
 
 static inline bool
@@ -206,6 +208,17 @@ static inline int gb_operation_unidirectional(struct gb_connection *connection,
                        request, request_size, GB_OPERATION_TIMEOUT_DEFAULT);
 }
 
+static inline void *gb_operation_get_data(struct gb_operation *operation)
+{
+       return operation->private;
+}
+
+static inline void gb_operation_set_data(struct gb_operation *operation,
+                                        void *data)
+{
+       operation->private = data;
+}
+
 int gb_operation_init(void);
 void gb_operation_exit(void);