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

iio: accel: adxl313: Fix alignment for DMA safety

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

Fixes: 636d44633039 ("iio: accel: Add driver support for ADXL313")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220508175712.647246-3-jic23@kernel.org

+1 -1
+1 -1
drivers/iio/accel/adxl313_core.c
··· 46 46 struct adxl313_data { 47 47 struct regmap *regmap; 48 48 struct mutex lock; /* lock to protect transf_buf */ 49 - __le16 transf_buf ____cacheline_aligned; 49 + __le16 transf_buf __aligned(IIO_DMA_MINALIGN); 50 50 }; 51 51 52 52 static const int adxl313_odr_freqs[][2] = {