]> Devoid-pointer.net GitWeb - KLGD.git/commitdiff
Extend user data in klgd_command struct by a union of either two u32 or
authorMichal Malý <madcatxster@devoid-pointer.net>
Tue, 11 Aug 2015 22:45:24 +0000 (00:45 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Tue, 11 Aug 2015 22:45:24 +0000 (00:45 +0200)
a pointer to arbitrary data.

klgd.h

diff --git a/klgd.h b/klgd.h
index 4716d9895a553c25b380867167ecc853c66f5942..3a3c0d429bebe3bc5faca081fd0dc3f204b59ef5 100644 (file)
--- 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 {