]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: greybus_protocols: remove svc-eject timeout define
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 9 Mar 2016 11:20:46 +0000 (12:20 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 10 Mar 2016 21:57:42 +0000 (13:57 -0800)
The SVC eject timeout is implementation specific and does not belong in
the protocol header so move it to the svc module.

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

index 524c64987b42a02a979f48ecce176bba6b1910fe..9c628cc5f8e683f73a94a30de3cf69421f19e0ec 100644 (file)
@@ -847,7 +847,6 @@ struct gb_svc_intf_reset_request {
 } __packed;
 /* interface reset response has no payload */
 
-#define GB_SVC_EJECT_TIME      9000
 struct gb_svc_intf_eject_request {
        __u8    intf_id;
 } __packed;
index b9ef77097d36ba4fd682a38e4efe0a4cd7610295..ae1911ce24eff59a741fa86a8a4c1e14b36b60c8 100644 (file)
@@ -14,6 +14,8 @@
 
 #define SVC_KEY_ARA_BUTTON     KEY_A
 
+#define SVC_INTF_EJECT_TIMEOUT 9000
+
 struct gb_svc_deferred_request {
        struct work_struct work;
        struct gb_operation *operation;
@@ -142,7 +144,7 @@ int gb_svc_intf_eject(struct gb_svc *svc, u8 intf_id)
        ret = gb_operation_sync_timeout(svc->connection,
                                        GB_SVC_TYPE_INTF_EJECT, &request,
                                        sizeof(request), NULL, 0,
-                                       GB_SVC_EJECT_TIME);
+                                       SVC_INTF_EJECT_TIMEOUT);
        if (ret) {
                dev_err(&svc->dev, "failed to eject interface %u\n", intf_id);
                return ret;