From 7ab2bfeff4ab906e6fca884dd7ce10d6dde66b8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Wed, 12 Aug 2015 00:45:24 +0200 Subject: [PATCH] Extend user data in klgd_command struct by a union of either two u32 or a pointer to arbitrary data. --- klgd.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/klgd.h b/klgd.h index 4716d98..3a3c0d4 100644 --- a/klgd.h +++ b/klgd.h @@ -4,13 +4,17 @@ * @bytes: Payload * @length: Number of bytes * @user: Arbitrary data that are not to be sent to the device. - * This data will not be free'd automatically when the command - * stream gets disposed of. + * Note that any data pointed to by the ptr will not + * be free'd automatically when the command stream gets + * disposed of. */ struct klgd_command { __u8 * const bytes; size_t length; - void *user; + union { + u32 data[2]; + void *ptr; + } user; }; struct klgd_command_stream { -- 2.43.5