Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: accel: adxl355: Fix alignment for DMA safety

____cacheline_aligned is insufficient guarantee for non-coherent DMA.
Switch to the updated IIO_DMA_MINALIGN definition.

Fixes: 327a0eaf19d53 ("iio: accel: adxl355: Add triggered buffer support")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Puranjay Mohan <puranjay12@gmail.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220508175712.647246-4-jic23@kernel.org

+1 -1
+1 -1
drivers/iio/accel/adxl355_core.c
··· 177 177 u8 buf[14]; 178 178 s64 ts; 179 179 } buffer; 180 - } ____cacheline_aligned; 180 + } __aligned(IIO_DMA_MINALIGN); 181 181 }; 182 182 183 183 static int adxl355_set_op_mode(struct adxl355_data *data,