greybus: core: add lower-limit for host-device buffers
Make sure we never end up with a host device with maximum buffer size
smaller than the shortest Greybus message.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h
index 1edd512..740aacc 100644
--- a/drivers/staging/greybus/operation.h
+++ b/drivers/staging/greybus/operation.h
@@ -69,6 +69,7 @@
__u8 pad[2]; /* must be zero (ignore when read) */
} __aligned(sizeof(u64));
+#define GB_OPERATION_MESSAGE_SIZE_MIN sizeof(struct gb_operation_msg_hdr)
#define GB_OPERATION_MESSAGE_SIZE_MAX U16_MAX
/*