diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-05-08 20:56:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-17 16:15:14 +0300 |
commit | 9748b6c196e86d7047f168e2550ce8f277e8325a (patch) | |
tree | 91b9193e3b3c1dd6164656c6392df78a17bb40df /drivers/iio/dac | |
parent | cee702a2792da21b88f6b7a1663f0c800f82c1f6 (diff) | |
download | linux-9748b6c196e86d7047f168e2550ce8f277e8325a.tar.xz |
iio: dac: ad5592r: Fix alignment for DMA safety
[ Upstream commit 4a4a79c06caeec47003bcbee1cf3094479f26e24 ]
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: 56ca9db862bf ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Paul Cercueil <paul@crapouillou.net>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220508175712.647246-49-jic23@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r-- | drivers/iio/dac/ad5592r-base.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5592r-base.h b/drivers/iio/dac/ad5592r-base.h index 2a22ef691996..cc7be426cbc8 100644 --- a/drivers/iio/dac/ad5592r-base.h +++ b/drivers/iio/dac/ad5592r-base.h @@ -14,6 +14,8 @@ #include <linux/mutex.h> #include <linux/gpio/driver.h> +#include <linux/iio/iio.h> + struct device; struct ad5592r_state; @@ -65,7 +67,7 @@ struct ad5592r_state { u8 gpio_in; u8 gpio_val; - __be16 spi_msg ____cacheline_aligned; + __be16 spi_msg __aligned(IIO_DMA_MINALIGN); __be16 spi_msg_nop; }; |