[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220815180453.867035052@linuxfoundation.org>
Date: Mon, 15 Aug 2022 19:59:46 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Nuno Sá <nuno.sa@...log.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.18 0587/1095] iio: accel: adxl313: Fix alignment for DMA safety
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
[ Upstream commit f68a0445ee86e48dafbfdea50163ad6fc6dba268 ]
____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@...wei.com>
Acked-by: Nuno Sá <nuno.sa@...log.com>
Link: https://lore.kernel.org/r/20220508175712.647246-3-jic23@kernel.org
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/iio/accel/adxl313_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/adxl313_core.c b/drivers/iio/accel/adxl313_core.c
index 9e4193e64765..afeef779e1d0 100644
--- a/drivers/iio/accel/adxl313_core.c
+++ b/drivers/iio/accel/adxl313_core.c
@@ -46,7 +46,7 @@ EXPORT_SYMBOL_NS_GPL(adxl313_writable_regs_table, IIO_ADXL313);
struct adxl313_data {
struct regmap *regmap;
struct mutex lock; /* lock to protect transf_buf */
- __le16 transf_buf ____cacheline_aligned;
+ __le16 transf_buf __aligned(IIO_DMA_MINALIGN);
};
static const int adxl313_odr_freqs[][2] = {
--
2.35.1
Powered by blists - more mailing lists