greybus: spi: fix transfers bigger than greybus payload
authorRui Miguel Silva <rui.silva@linaro.org>
Wed, 2 Dec 2015 11:12:29 +0000 (11:12 +0000)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 3 Dec 2015 22:20:49 +0000 (14:20 -0800)
commit31bc2c9bcd3054b90322acf85a53aacbb9e29ee4
tree6e21543dd7ff79c56228c4e49fca61647ff21335
parent11aa7121edfa4c32b06e9278e6d0e51d197d3560
greybus: spi: fix transfers bigger than greybus payload

Add helper functions calculate the tx and rx size possible that fit a
greybus payload size and change the operation creation to adjust to that.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/spi.c