OSDN Git Service

greybus: use outgoing flag when creating operation
authorAlex Elder <elder@linaro.org>
Mon, 1 Dec 2014 13:53:06 +0000 (07:53 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 2 Dec 2014 04:40:35 +0000 (20:40 -0800)
In gb_operation_create_common(), a zero response size is still
being used to determine whether to use GFP_KERNEL or GFP_ATOMIC
when allocating a message.  Use the value of the "outgoing"
parameter to decide this instead.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c

index 226565d..7617410 100644 (file)
@@ -377,7 +377,7 @@ gb_operation_create_common(struct gb_connection *connection, bool outgoing,
 {
        struct greybus_host_device *hd = connection->hd;
        struct gb_operation *operation;
-       gfp_t gfp_flags = response_size ? GFP_KERNEL : GFP_ATOMIC;
+       gfp_t gfp_flags = outgoing ? GFP_KERNEL : GFP_ATOMIC;
 
        operation = kmem_cache_zalloc(gb_operation_cache, gfp_flags);
        if (!operation)