mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
d590faf9e8
The SPI tx and rx buffers are both supposed to be scan_bytes amount of
bytes large and a common allocation is used to allocate both buffers. This
puts the beginning of the tx buffer scan_bytes bytes after the rx buffer.
The initialization of the tx buffer pointer is done adding scan_bytes to
the beginning of the rx buffer, but since the rx buffer is of type __be16
this will actually add two times as much and the tx buffer ends up pointing
after the allocated buffer.
Fix this by using scan_count, which is scan_bytes / 2, instead of
scan_bytes when initializing the tx buffer pointer.
Fixes:
|
||
---|---|---|
.. | ||
accel | ||
adc | ||
amplifiers | ||
buffer | ||
chemical | ||
common | ||
dac | ||
frequency | ||
gyro | ||
humidity | ||
imu | ||
light | ||
magnetometer | ||
orientation | ||
potentiometer | ||
pressure | ||
proximity | ||
temperature | ||
trigger | ||
iio_core_trigger.h | ||
iio_core.h | ||
industrialio-buffer.c | ||
industrialio-core.c | ||
industrialio-event.c | ||
industrialio-trigger.c | ||
industrialio-triggered-event.c | ||
inkern.c | ||
Kconfig | ||
Makefile |