summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/operation.c
diff options
context:
space:
mode:
authorAlex Elder2014-11-18 01:08:37 +0100
committerGreg Kroah-Hartman2014-11-18 02:19:20 +0100
commit374e6a269cc3b1f044be78215c3e96021796de7d (patch)
tree3eef1a2fa683c8a80b1aa54c97dba1c815332dd4 /drivers/staging/greybus/operation.c
parentgreybus: kill the gbuf slab cache (diff)
downloadkernel-qcow2-linux-374e6a269cc3b1f044be78215c3e96021796de7d.tar.gz
kernel-qcow2-linux-374e6a269cc3b1f044be78215c3e96021796de7d.tar.xz
kernel-qcow2-linux-374e6a269cc3b1f044be78215c3e96021796de7d.zip
greybus: kill off the last of gbuf.c
Only three functions remain in "gbuf.c". Move one of them into "connection.c" and the other two into "operation.c". Some more cleanup is coming that will further straighten out gbufs but for now there's no sense in drawing this out any longer. 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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c
index 7eaea71f8604..223988327795 100644
--- a/drivers/staging/greybus/operation.c
+++ b/drivers/staging/greybus/operation.c
@@ -103,6 +103,20 @@ gb_pending_operation_find(struct gb_connection *connection, u16 id)
return found ? operation : NULL;
}
+static int greybus_submit_gbuf(struct gbuf *gbuf, gfp_t gfp_mask)
+{
+ gbuf->status = -EINPROGRESS;
+
+ return gbuf->hd->driver->submit_gbuf(gbuf, gfp_mask);
+}
+
+static void greybus_kill_gbuf(struct gbuf *gbuf)
+{
+ if (gbuf->status != -EINPROGRESS)
+ return;
+
+ gbuf->hd->driver->kill_gbuf(gbuf);
+}
/*
* An operations's response message has arrived. If no callback was
* supplied it was submitted for asynchronous completion, so we notify