Commit ae5bc07
iio: temperature: maxim_thermocouple: use DMA-safe buffer for spi_read()
Replace using stack-allocated buffers with a DMA-safe buffer for use
with spi_read(). This allows the driver to be safely used with
DMA-enabled SPI controllers.
The buffer array is also converted to a struct with a union to make the
usage of the memory in the buffer more clear and ensure proper alignment.
Fixes: 1f25ca1 ("iio: temperature: add support for Maxim thermocouple chips")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20250721-iio-use-more-iio_declare_buffer_with_ts-3-v2-1-0c68d41ccf6c@baylibre.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>1 parent 1cfb22c commit ae5bc07
1 file changed
+16
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
132 | 140 | | |
133 | | - | |
134 | | - | |
135 | 141 | | |
136 | 142 | | |
137 | 143 | | |
138 | 144 | | |
139 | | - | |
140 | | - | |
| 145 | + | |
| 146 | + | |
141 | 147 | | |
142 | 148 | | |
143 | | - | |
144 | | - | |
| 149 | + | |
| 150 | + | |
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
| |||
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
169 | | - | |
| 175 | + | |
170 | 176 | | |
171 | | - | |
| 177 | + | |
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
| |||
0 commit comments