Commit 94b15d76 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: use outgoing flag when creating operation

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: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 615772aa
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment