greybus: Greybus driver: add a new callbacks to driver
[cascardo/linux.git] / drivers / staging / greybus / connection.c
index 466ea36..c25e570 100644 (file)
@@ -262,6 +262,8 @@ gb_connection_create_range(struct greybus_host_device *hd,
                gb_svc_connection_create(hd->svc,
                                         hd->endo->ap_intf_id, hd_cport_id,
                                         bundle->intf->interface_id, cport_id);
+               if (hd->driver->connection_create)
+                       hd->driver->connection_create(connection);
        }
 
        gb_connection_bind_protocol(connection);
@@ -430,6 +432,9 @@ void gb_connection_destroy(struct gb_connection *connection)
        list_del(&connection->hd_links);
        spin_unlock_irq(&gb_connections_lock);
 
+       if (connection->hd->driver->connection_destroy)
+               connection->hd->driver->connection_destroy(connection);
+
        if (connection->protocol)
                gb_protocol_put(connection->protocol);
        connection->protocol = NULL;