greybus: use alloc_gbuf_data() for both directions
authorAlex Elder <elder@linaro.org>
Mon, 6 Oct 2014 11:53:11 +0000 (06:53 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 6 Oct 2014 15:56:43 +0000 (08:56 -0700)
commit9a6f6314d17ce2b66a6293b86f79afda6e9a563b
treee59c21f5ca5f9ce1132fcc32a8de6e3be4d14512
parent6eb3f4bdec331c951906792479a0f7ea49fe9a5c
greybus: use alloc_gbuf_data() for both directions

Change the "direction" flag field of a gbuf to be a Boolean called
"outbound".

Add a Boolean outbound flag to alloc_gbuf_data(), and use it for
allocating the data buffer for gbufs for data being transferred in
either direction.

Update free_gbuf_data() accordingly--letting the host device
driver's gbuf data free function handle all of them.

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