OSDN Git Service

staging: fbtft: do not allocate huge txbuf
authorMichal Suchanek <hramrach@gmail.com>
Thu, 9 Jun 2016 15:08:42 +0000 (15:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 15:52:47 +0000 (17:52 +0200)
commit175f5a4130b20e25b34d9f9b0bb4cfe80ee49d88
treebf5b50d905015dd6ee08984780ee5f9097265e72
parentd2805d7fff5ba1db3accd5ef010f9fdbb1925f08
staging: fbtft: do not allocate huge txbuf

txbuflen can be set to arbitrary value by user and it is also set
automagically to the maximum transfer size of the SPI master controller.

Do not allocate the buffer when larger than vmem. When my SPI master
controller reports maximum transfer size 16M the probe of fbtft fails.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c