Commit d18da86b authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: greybus_protocols: remove svc-eject timeout define

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: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent e676ccd7
...@@ -847,7 +847,6 @@ struct gb_svc_intf_reset_request { ...@@ -847,7 +847,6 @@ struct gb_svc_intf_reset_request {
} __packed; } __packed;
/* interface reset response has no payload */ /* interface reset response has no payload */
#define GB_SVC_EJECT_TIME 9000
struct gb_svc_intf_eject_request { struct gb_svc_intf_eject_request {
__u8 intf_id; __u8 intf_id;
} __packed; } __packed;
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#define SVC_KEY_ARA_BUTTON KEY_A #define SVC_KEY_ARA_BUTTON KEY_A
#define SVC_INTF_EJECT_TIMEOUT 9000
struct gb_svc_deferred_request { struct gb_svc_deferred_request {
struct work_struct work; struct work_struct work;
struct gb_operation *operation; struct gb_operation *operation;
...@@ -142,7 +144,7 @@ int gb_svc_intf_eject(struct gb_svc *svc, u8 intf_id) ...@@ -142,7 +144,7 @@ int gb_svc_intf_eject(struct gb_svc *svc, u8 intf_id)
ret = gb_operation_sync_timeout(svc->connection, ret = gb_operation_sync_timeout(svc->connection,
GB_SVC_TYPE_INTF_EJECT, &request, GB_SVC_TYPE_INTF_EJECT, &request,
sizeof(request), NULL, 0, sizeof(request), NULL, 0,
GB_SVC_EJECT_TIME); SVC_INTF_EJECT_TIMEOUT);
if (ret) { if (ret) {
dev_err(&svc->dev, "failed to eject interface %u\n", intf_id); dev_err(&svc->dev, "failed to eject interface %u\n", intf_id);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment