Disable and flush incoming operations before calling driver disconnect.
Bundle drivers are still responsible for disabling their connections
in their disconnect callback.
Note that specifically the legacy protocols must have incoming
operations disabled when their connection_exit callback is called as
that is where their state is deallocated.
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
{
struct greybus_driver *driver = to_greybus_driver(dev->driver);
struct gb_bundle *bundle = to_gb_bundle(dev);
+ struct gb_connection *connection;
+
+ list_for_each_entry(connection, &bundle->connections, bundle_links)
+ gb_connection_disable_rx(connection);
driver->disconnect(bundle);
return 0;