]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
greybus: use a simple list of hd connections
authorAlex Elder <elder@linaro.org>
Mon, 17 Nov 2014 14:08:44 +0000 (08:08 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 17 Nov 2014 18:41:19 +0000 (10:41 -0800)
commit2c43ce49672eacd1df87df92c2ddfdb02e276be0
tree6409e20b8871731ee06e59bc69f7f64f687b6593
parentba99346828089d3833a5c31106b60b3a8cddb91d
greybus: use a simple list of hd connections

First of all, there's a bug in _gb_hd_connection_insert, which
Viresh found.  But pointing out that problem just called attention
to the fact that I have planning to to remove the affected block of
code.

The set of connections associated with a host device is currently
maintained in a red-black tree.  The number of connections we're
likely to have is on the order of a hundred, and at least for now
isn't even going to approach that.  When this code first went in,
Greg asserted that using a list is speedier than a red-black tree
for smallish numbers of elements (maybe up to a few hundred?).

So this patch just removes the host device's red-black tree of
connections, using a simple list instead.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/connection.c
drivers/staging/greybus/connection.h
drivers/staging/greybus/core.c
drivers/staging/greybus/greybus.h