summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/operation.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-05-19 11:22:45 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2015-05-20 22:52:03 -0700
commit8e929a8230794c4b034d0f4b658aa03702f3800d (patch)
tree4bffa1a3165d2dbf654d70796ac7d1da343fe7e0 /drivers/staging/greybus/operation.h
parentc38cf10bbe35ba6fa10437809585fd4d0b3b604d (diff)
downloadop-kernel-dev-8e929a8230794c4b034d0f4b658aa03702f3800d.zip
op-kernel-dev-8e929a8230794c4b034d0f4b658aa03702f3800d.tar.gz
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>
Diffstat (limited to 'drivers/staging/greybus/operation.h')
-rw-r--r--drivers/staging/greybus/operation.h1
1 files changed, 1 insertions, 0 deletions
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 @@ struct gb_operation_msg_hdr {
__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
/*
OpenPOWER on IntegriCloud