greybus: use gbuf's destination cport id
authorAlex Elder <elder@linaro.org>
Mon, 17 Nov 2014 14:08:42 +0000 (08:08 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 17 Nov 2014 18:41:19 +0000 (10:41 -0800)
commit6af29086bfbe201723a82b732ba5b12ecb2dfc53
treeb6fa671a850ced68b6a40e9f23a71f2f86cd7bff
parent63921d88724168da6d7868aa5eae8def6888a253
greybus: use gbuf's destination cport id

If the buffer allocated in the ES1 alloc_gbuf_data() routine is for
outbound data, we are getting the destination CPort id from the
connection.  Switch to using the copy of the destination cport id
we now have in the gbuf instead.

Check for a valid CPort id there only if we're inserting it into
the buffer.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/es1-ap-usb.c