greybus: remove submit_svc from the host driver
authorGreg Kroah-Hartman <gregkh@google.com>
Sat, 25 Jul 2015 00:19:21 +0000 (17:19 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 27 Jul 2015 21:13:16 +0000 (14:13 -0700)
The callback is never used anymore, so remove it from struct
greybus_host_driver as well as from the es1 and es2 drivers.

Tested-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/core.c
drivers/staging/greybus/es1.c
drivers/staging/greybus/es2.c
drivers/staging/greybus/greybus.h

index 18075f7ec0380ae5fb49237efef186252248a81e..49a28ba532dcd4184c9550b0323827f0a7fa2ba2 100644 (file)
@@ -175,8 +175,7 @@ struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *driver
         * Validate that the driver implements all of the callbacks
         * so that we don't have to every time we make them.
         */
-       if ((!driver->message_send) || (!driver->message_cancel) ||
-           (!driver->submit_svc)) {
+       if ((!driver->message_send) || (!driver->message_cancel)) {
                pr_err("Must implement all greybus_host_driver callbacks!\n");
                return ERR_PTR(-EINVAL);
        }
index 82a7c67c103762e6784a96e68e515568a5cd668b..e203180e1e5c8c5cd2dbd1e4a438f8e4ae555be4 100644 (file)
@@ -14,7 +14,6 @@
 #include <asm/unaligned.h>
 
 #include "greybus.h"
-#include "svc_msg.h"
 #include "kernel_ver.h"
 
 /* Memory sizes for the buffers sent to/from the ES1 controller */
@@ -95,26 +94,6 @@ static void usb_log_enable(struct es1_ap_dev *es1);
 static void usb_log_disable(struct es1_ap_dev *es1);
 
 #define ES1_TIMEOUT    500     /* 500 ms for the SVC to do something */
-static int submit_svc(struct svc_msg *svc_msg, struct greybus_host_device *hd)
-{
-       struct es1_ap_dev *es1 = hd_to_es1(hd);
-       int retval;
-
-       /* SVC messages go down our control pipe */
-       retval = usb_control_msg(es1->usb_dev,
-                                usb_sndctrlpipe(es1->usb_dev,
-                                                es1->control_endpoint),
-                                REQUEST_SVC,
-                                USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
-                                0x00, 0x00,
-                                (char *)svc_msg,
-                                sizeof(*svc_msg),
-                                ES1_TIMEOUT);
-       if (retval != sizeof(*svc_msg))
-               return retval;
-
-       return 0;
-}
 
 static struct urb *next_free_urb(struct es1_ap_dev *es1, gfp_t gfp_mask)
 {
@@ -295,7 +274,6 @@ static struct greybus_host_driver es1_driver = {
        .hd_priv_size           = sizeof(struct es1_ap_dev),
        .message_send           = message_send,
        .message_cancel         = message_cancel,
-       .submit_svc             = submit_svc,
 };
 
 /* Common function to report consistent warnings based on URB status */
index c353ca56ce965a07361dbecad460505f5ffcbfdc..aba1927fc34f0b0f0a879d3f26bb5359f17bf25f 100644 (file)
@@ -14,7 +14,6 @@
 #include <asm/unaligned.h>
 
 #include "greybus.h"
-#include "svc_msg.h"
 #include "kernel_ver.h"
 
 /* Memory sizes for the buffers sent to/from the ES1 controller */
@@ -134,26 +133,6 @@ static int cport_to_ep(struct es1_ap_dev *es1, u16 cport_id)
 }
 
 #define ES1_TIMEOUT    500     /* 500 ms for the SVC to do something */
-static int submit_svc(struct svc_msg *svc_msg, struct greybus_host_device *hd)
-{
-       struct es1_ap_dev *es1 = hd_to_es1(hd);
-       int retval;
-
-       /* SVC messages go down our control pipe */
-       retval = usb_control_msg(es1->usb_dev,
-                                usb_sndctrlpipe(es1->usb_dev,
-                                                es1->control_endpoint),
-                                REQUEST_SVC,
-                                USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
-                                0x00, 0x00,
-                                (char *)svc_msg,
-                                sizeof(*svc_msg),
-                                ES1_TIMEOUT);
-       if (retval != sizeof(*svc_msg))
-               return retval;
-
-       return 0;
-}
 
 static int ep_in_use(struct es1_ap_dev *es1, int bulk_ep_set)
 {
@@ -391,7 +370,6 @@ static struct greybus_host_driver es1_driver = {
        .hd_priv_size           = sizeof(struct es1_ap_dev),
        .message_send           = message_send,
        .message_cancel         = message_cancel,
-       .submit_svc             = submit_svc,
 };
 
 /* Common function to report consistent warnings based on URB status */
index a0114953d3e7cf821970406c348f4052c2ee1139..30ea4a4c17eaafd43e63a7315e0fadfd6af53a1e 100644 (file)
@@ -84,8 +84,6 @@ struct greybus_host_driver {
        int (*message_send)(struct greybus_host_device *hd, u16 dest_cport_id,
                        struct gb_message *message, gfp_t gfp_mask);
        void (*message_cancel)(struct gb_message *message);
-       int (*submit_svc)(struct svc_msg *svc_msg,
-                           struct greybus_host_device *hd);
 };
 
 struct greybus_host_device {