Commit 00d2e758 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: look up connection for recevied messages

Look up the connection that an incoming message is associated with.
This is the start of making message handling oriented toward the
the connection rather than the cport.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent ee9ebe4d
......@@ -179,6 +179,14 @@ void greybus_cport_in(struct greybus_host_device *hd, u16 cport_id,
{
struct gb_cport_handler *ch;
struct gbuf *gbuf;
struct gb_connection *connection;
connection = gb_hd_connection_find(hd, cport_id);
if (!connection) {
dev_err(hd->parent,
"nonexistent connection (%zu bytes dropped)\n", length);
return;
}
/* first check to see if we have a cport handler for this cport */
ch = &cport_handler[cport_id];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment