greybus: svc: No need of a separate version request
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 21 Jul 2015 12:14:20 +0000 (17:44 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 22 Jul 2015 17:12:41 +0000 (10:12 -0700)
SVC already provided version to the AP on version-request, no need to
ask for that again. Drop it.

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

index ee467799d2d7e9459d9f794fffb28e71e0f20ba9..c9bbdc04e2d768dca5241d629ca02fd3a1846755 100644 (file)
@@ -11,9 +11,6 @@
 
 static struct ida greybus_svc_device_id_map;
 
-/* Define get_version() routine */
-define_get_version(gb_svc, SVC);
-
 /*
  * AP's SVC cport is required early to get messages from the SVC. This happens
  * even before the Endo is created and hence any modules or interfaces.
@@ -390,19 +387,9 @@ static int gb_svc_request_recv(u8 type, struct gb_operation *op)
        }
 }
 
-/*
- * Do initial setup of the SVC.
- */
-static int gb_svc_device_setup(struct gb_svc *gb_svc)
-{
-       /* First thing we need to do is check the version */
-       return get_version(gb_svc);
-}
-
 static int gb_svc_connection_init(struct gb_connection *connection)
 {
        struct gb_svc *svc;
-       int ret;
 
        svc = kzalloc(sizeof(*svc), GFP_KERNEL);
        if (!svc)
@@ -426,14 +413,10 @@ static int gb_svc_connection_init(struct gb_connection *connection)
 
        ida_init(&greybus_svc_device_id_map);
 
-       ret = gb_svc_device_setup(svc);
-       if (ret)
-               kfree(svc);
-
        /* Set interface's svc connection */
        connection->bundle->intf->svc = svc;
 
-       return ret;
+       return 0;
 }
 
 static void gb_svc_connection_exit(struct gb_connection *connection)