greybus: add bg_hd_connection_find()
authorAlex Elder <elder@linaro.org>
Mon, 6 Oct 2014 11:53:08 +0000 (06:53 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 6 Oct 2014 15:56:42 +0000 (08:56 -0700)
commitee9ebe4d0b78e64f0c3741085d230ea18c15f4e4
tree5daa4e5e458430d6f45c8976fca016486697beeb
parent369fb8324969a94c2f243ea56641993ee2061e60
greybus: add bg_hd_connection_find()

Add a function that looks up a connection given the host device
pointer an the host cport id.  This will be used to determine which
connection an incoming message is associated with.

Replace the list tracking host device connections with a red-black
tree so lookup can scale and be done quickly.

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