greybus: get rid of pending operations list

A connection has two lists of operations, and an operation is always
on one or the other of them.  One of them contains the operations
that are currently "in flight".

We really don't expect to have very many in-flight operations on any
given connection (in fact, at the moment it's always exactly one).
So there's no significant performance benefit to keeping these in a
separate list.  An in-flight operation can also be distinguished by
its errno field holding -EINPROGRESS.

Get rid of the pending list, and search all operations rather than
the pending list when looking up a response message's operation.
Rename gb_pending_operation_find() accordingly.

There's no longer any need to remove operations from the pending
list, and the insertion function no longer has anything to do with a
pending list.  Just open code what was the insertion function (it
now has only to do with assigning the operation id).

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
4 files changed
tree: b1e1d98a1f823bfe3bbd88eba80e8fbf2f5c3815
  1. drivers/