greybus: svc: No need of per-direction route-create requests
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 7 Sep 2015 10:31:25 +0000 (16:01 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 15 Sep 2015 04:19:46 +0000 (21:19 -0700)
The route-create request creates bi-directional routes and there is no
need to make separate calls for setting up routes on both the
directions.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/svc.c

index 21dafcc..71a4869 100644 (file)
@@ -148,6 +148,7 @@ void gb_svc_connection_destroy(struct gb_svc *svc, u8 intf1_id, u16 cport1_id,
 }
 EXPORT_SYMBOL_GPL(gb_svc_connection_destroy);
 
+/* Creates bi-directional routes between the devices */
 static int gb_svc_route_create(struct gb_svc *svc, u8 intf1_id, u8 dev1_id,
                               u8 intf2_id, u8 dev2_id)
 {
@@ -305,14 +306,6 @@ static void svc_process_hotplug(struct work_struct *work)
                goto ida_put;
        }
 
-       ret = gb_svc_route_create(svc, intf_id, device_id, hd->endo->ap_intf_id,
-                                 GB_DEVICE_ID_AP);
-       if (ret) {
-               dev_err(dev, "%s: Route create operation failed, interface %hhu device_id %hhu (%d)\n",
-                       __func__, intf_id, device_id, ret);
-               goto ida_put;
-       }
-
        ret = gb_interface_init(intf, device_id);
        if (ret) {
                dev_err(dev, "%s: Failed to initialize interface, interface %hhu device_id %hhu (%d)\n",