summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/operation.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-04-29 17:08:37 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-04-29 14:27:05 -0700
commit7adb32b429ce38bae39e277ae2cc37c93770104f (patch)
treea9a1790410ec4724728a11aa4f87abf552270b96 /drivers/staging/greybus/operation.c
parenta2cf2e594626ce8c1e6944f6a44a7d481b84b82d (diff)
greybus: operation: fix definition of the invalid type
The invalid request type has been redefined as 0x7f. Also remove the redundant redefinition of the invalid type from the operation header. Note that operation type 0x00 has been repurposed for the new generic ping operation, which will be used to implement proper connection tear down. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/operation.c')
-rw-r--r--drivers/staging/greybus/operation.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c
index fcae74793740..e7e9b0e72269 100644
--- a/drivers/staging/greybus/operation.c
+++ b/drivers/staging/greybus/operation.c
@@ -282,10 +282,10 @@ static void gb_operation_message_init(struct gb_host_device *hd,
/*
* The type supplied for incoming message buffers will be
- * 0x00. Such buffers will be overwritten by arriving data
- * so there's no need to initialize the message header.
+ * GB_REQUEST_TYPE_INVALID. Such buffers will be overwritten by
+ * arriving data so there's no need to initialize the message header.
*/
- if (type != GB_OPERATION_TYPE_INVALID) {
+ if (type != GB_REQUEST_TYPE_INVALID) {
u16 message_size = (u16)(sizeof(*header) + payload_size);
/*
@@ -536,7 +536,7 @@ gb_operation_create_flags(struct gb_connection *connection,
size_t response_size, unsigned long flags,
gfp_t gfp)
{
- if (WARN_ON_ONCE(type == GB_OPERATION_TYPE_INVALID))
+ if (WARN_ON_ONCE(type == GB_REQUEST_TYPE_INVALID))
return NULL;
if (WARN_ON_ONCE(type & GB_MESSAGE_TYPE_RESPONSE))
type &= ~GB_MESSAGE_TYPE_RESPONSE;
@@ -573,7 +573,9 @@ gb_operation_create_incoming(struct gb_connection *connection, u16 id,
flags |= GB_OPERATION_FLAG_UNIDIRECTIONAL;
operation = gb_operation_create_common(connection, type,
- request_size, 0, flags, GFP_ATOMIC);
+ request_size,
+ GB_REQUEST_TYPE_INVALID,
+ flags, GFP_ATOMIC);
if (!operation)
return NULL;