diff options
author | Alex Elder <elder@linaro.org> | 2015-05-07 13:03:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-05-07 22:57:31 +0200 |
commit | 6d653370c0a67ff9b9b0d8249182d537859b528c (patch) | |
tree | a7522c75f35a67ff55202eddb1b3f61809e551ab /drivers/staging/greybus/vibrator.c | |
parent | 5c58640d8d66504c43c062e6e7d4ed0ade6bde9e (diff) | |
download | op-kernel-dev-6d653370c0a67ff9b9b0d8249182d537859b528c.zip op-kernel-dev-6d653370c0a67ff9b9b0d8249182d537859b528c.tar.gz |
greybus: eliminate extra response flag definitions
All protocols use the same value to distinguish between request and
response message types. This is a requirement.
Use GB_MESSAGE_TYPE_RESPONSE rather than GB_OPERATION_TYPE_RESPONSE
for the name of the flag used to distiguish between request and
response messages.
Get rid of the redundant response flag definitions that are
associated with specific protocols.
Describe the symbolic values as "operation types" rather than
"message types" where they are defined. The message type for a
request is the same as the operation type; the message type for a
response is the operation type OR'd with GB_MESSAGE_TYPE_RESPONSE.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/vibrator.c')
-rw-r--r-- | drivers/staging/greybus/vibrator.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/greybus/vibrator.c b/drivers/staging/greybus/vibrator.c index 2943a9b..aefd2cd 100644 --- a/drivers/staging/greybus/vibrator.c +++ b/drivers/staging/greybus/vibrator.c @@ -27,12 +27,11 @@ struct gb_vibrator_device { #define GB_VIBRATOR_VERSION_MAJOR 0x00 #define GB_VIBRATOR_VERSION_MINOR 0x01 -/* Greybus Vibrator request types */ +/* Greybus Vibrator operation types */ #define GB_VIBRATOR_TYPE_INVALID 0x00 #define GB_VIBRATOR_TYPE_PROTOCOL_VERSION 0x01 #define GB_VIBRATOR_TYPE_ON 0x02 #define GB_VIBRATOR_TYPE_OFF 0x03 -#define GB_VIBRATOR_TYPE_RESPONSE 0x80 /* OR'd with rest */ struct gb_vibrator_on_request { __le16 timeout_ms; |