greybus: esX: use one byte to encode cport ids in header
authorAlex Elder <elder@linaro.org>
Sat, 13 Jun 2015 16:02:11 +0000 (11:02 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 15 Jun 2015 23:49:00 +0000 (16:49 -0700)
commit4bc1389de9fcaaaf2f93e278f588858fb4fe2038
tree7f28bdcd8bc556ec4f7168d53acec8927127b3a8
parent88d18a975ddac4fa849909c2ae178b0c126f7f8e
greybus: esX: use one byte to encode cport ids in header

We now limit the maximum value for both host and module CPort ids,
and we know they can always be represented in a single byte.

Make use of this by using only one of the two pad bytes for encoding
the CPort id in a message header.

(Note that we have never used a CPort higher than 255.  Encoding
such a small CPort id in little endian 2-byte format has the same
result as what is done here.)

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/es1.c
drivers/staging/greybus/es2.c