spi: fsl-espi: pre-allocate message buffer
Currently the driver allocates a 64kb buffer for each single message. On systems with little and fragmented memory this can result in memory allocation errors. Solve this by pre-allocating a buffer. This patch was developed in OpenWRT long ago, however it never made it upstream. I slightly modified the original patch to re-initialize the buffer at the beginning of each transfer. Signed-off-by: NGabor Juhos <juhosg@openwrt.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
Showing
想要评论请 注册 或 登录