From d18da86b51c135100e297a9833bcdc586e68a84b Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Wed, 9 Mar 2016 12:20:46 +0100 Subject: [PATCH] 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: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/greybus_protocols.h | 1 - drivers/staging/greybus/svc.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h index 524c64987b42..9c628cc5f8e6 100644 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@ -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; diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index b9ef77097d36..ae1911ce24ef 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -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; -- 2.20.1