forked from luck/tmp_suning_uos_patched
067d9120a3
commit 0fb6ee8d0b5e90b72f870f76debc8bd31a742014 upstream.
Use a heap allocated memory for the SPI transfer buffer. Using stack memory
can corrupt stack memory when using DMA on some systems.
This change moves the buffer from the stack of the trigger handler call to
the heap of the buffer of the state struct. The size increases takes into
account the alignment for the timestamp, which is 8 bytes.
The 'data' buffer is split into 'tx_buf' and 'rx_buf', to make a clearer
separation of which part of the buffer should be used for TX & RX.
Fixes:
|
||
---|---|---|
.. | ||
accel | ||
adc | ||
common | ||
dac | ||
frequency | ||
gyro | ||
imu | ||
timer | ||
buffer_impl.h | ||
buffer-dma.h | ||
buffer-dmaengine.h | ||
buffer.h | ||
configfs.h | ||
consumer.h | ||
driver.h | ||
events.h | ||
hw-consumer.h | ||
iio-opaque.h | ||
iio.h | ||
kfifo_buf.h | ||
machine.h | ||
sw_device.h | ||
sw_trigger.h | ||
sysfs.h | ||
trigger_consumer.h | ||
trigger.h | ||
triggered_buffer.h | ||
triggered_event.h | ||
types.h |