Commit 65e50f95 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: set route before sending packets

The route for a connection needs to be set *before* we initialize
the connection.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 8a9bf8a9
......@@ -130,13 +130,21 @@ gb_module_interface_init(struct gb_module *gmod, u8 interface_id, u8 device_id)
interface_id);
return -ENOENT;
}
ret = svc_set_route_send(interface, gmod->hd);
if (ret) {
dev_err(gmod->hd->parent, "failed to set route (%d)\n", ret);
return ret;
}
ret = gb_interface_connections_init(interface);
if (ret) {
dev_err(gmod->hd->parent, "module interface init error %d\n",
ret);
/* XXX clear route */
return ret;
}
interface->device_id = device_id;
return svc_set_route_send(interface, gmod->hd);
return 0;
}
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