From: Alex Elder Date: Mon, 1 Dec 2014 13:53:06 +0000 (-0600) Subject: greybus: use outgoing flag when creating operation X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1809 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=94b15d7613e861563b9f06fac2c273ca8e2fc269;p=karo-tx-linux.git 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: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 226565d4503a..7617410f7c5a 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -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)