greybus: connection: handle bundle-less connections in svc helpers
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 25 Nov 2015 14:59:22 +0000 (15:59 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 25 Nov 2015 23:39:16 +0000 (15:39 -0800)
The svc connection helper functions should not assume that all dynamic
connections will have a bundle.

This is needed as the control bundle is going away.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c

index 7beab7468a0d41ffbf3891311103aa466b6f1721..7dde8a11935e5838af9d17d9a4e3e151b8774cfd 100644 (file)
@@ -294,7 +294,7 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
        if (gb_connection_is_static(connection))
                return 0;
 
-       intf = connection->bundle->intf;
+       intf = connection->intf;
        ret = gb_svc_connection_create(hd->svc,
                        hd->svc->ap_intf_id,
                        connection->hd_cport_id,
@@ -320,7 +320,7 @@ gb_connection_svc_connection_destroy(struct gb_connection *connection)
        gb_svc_connection_destroy(connection->hd->svc,
                                  connection->hd->svc->ap_intf_id,
                                  connection->hd_cport_id,
-                                 connection->bundle->intf->interface_id,
+                                 connection->intf->interface_id,
                                  connection->intf_cport_id);
 }