usb: host: max3421-hcd: fix "spi_rd8" uses dynamic stack allocation warning
authorDavid Mosberger-Tang <davidm@egauge.net>
Thu, 29 May 2014 04:40:00 +0000 (22:40 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2014 18:19:30 +0000 (11:19 -0700)
commit05dfa5c9bc37933181b619e42ec0eeb41ef31362
treeebfb9688445978d2e69b9638d0308dd7692fd320
parent00c5aa178a5ba217a4143f8a5f70630550a87600
usb: host: max3421-hcd: fix "spi_rd8" uses dynamic stack allocation warning

kmalloc the SPI rx and tx data buffers.  This appears to be the only
portable way to guarantee that the buffers are DMA-safe (e.g., in
separate DMA cache-lines).  This patch makes the spi_rdX()/spi_wrX()
non-reentrant, but that's OK because calls to them are guaranteed to
be serialized by the per-HCD SPI-thread.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David Mosberger <davidm@egauge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/max3421-hcd.c