diff options
author | Alex Elder | 2014-11-18 20:26:54 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-11-18 21:53:38 +0100 |
commit | de80073a1768b0fb01df0e597225047fd66e8044 (patch) | |
tree | f038a3763848ee184a1b9b81cea6ff5db8751408 /drivers/staging/greybus/operation.c | |
parent | greybus: stop storing dest_cport_id in message (diff) | |
download | kernel-qcow2-linux-de80073a1768b0fb01df0e597225047fd66e8044.tar.gz kernel-qcow2-linux-de80073a1768b0fb01df0e597225047fd66e8044.tar.xz kernel-qcow2-linux-de80073a1768b0fb01df0e597225047fd66e8044.zip |
greybus: pass gfp_flags for message allocation
The only reason gb_operation_message_init() gets its "outbound"
argument is so we can determine what allocation flags to use.
Just pass the flags in directly instead.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'drivers/staging/greybus/operation.c')
-rw-r--r-- | drivers/staging/greybus/operation.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 705b195dfe01..96f4c689e998 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -230,13 +230,12 @@ static void operation_timeout(struct work_struct *work) */ static int gb_operation_message_init(struct gb_operation *operation, u8 type, size_t size, - bool request, bool outbound) + bool request, gfp_t gfp_flags) { struct gb_connection *connection = operation->connection; struct greybus_host_device *hd = connection->hd; struct gb_message *message; struct gb_operation_msg_hdr *header; - gfp_t gfp_flags = request && !outbound ? GFP_ATOMIC : GFP_KERNEL; if (size > GB_OPERATION_MESSAGE_SIZE_MAX) return -E2BIG; @@ -311,13 +310,13 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection, operation->connection = connection; ret = gb_operation_message_init(operation, type, request_size, - true, outgoing); + true, gfp_flags); if (ret) goto err_cache; if (outgoing) { ret = gb_operation_message_init(operation, type, response_size, - false, false); + false, GFP_KERNEL); if (ret) goto err_request; } |