mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
iio: addac: ad74413r: use aligned_s64 for timestamp
Follow the pattern of other drivers and use aligned_s64 for the timestamp. Technically there was no issue here since AD74413R_FRAME_SIZE * AD74413R_CHANNEL_MAX == 16 and IIO_DMA_MINALIGN is always a multiple of 8. But best to conform in case someone copies this to new code and then tweaks something. Also move the unaligned.h header while touching this since it was the only one not in alphabetical order. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/20250417-iio-more-timestamp-alignment-v1-3-eafac1e22318@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
c88ec0d8ad
commit
8f2d5147dd
|
@ -4,7 +4,6 @@
|
|||
* Author: Cosmin Tanislav <cosmin.tanislav@analog.com>
|
||||
*/
|
||||
|
||||
#include <linux/unaligned.h>
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/cleanup.h>
|
||||
#include <linux/crc8.h>
|
||||
|
@ -24,6 +23,8 @@
|
|||
#include <linux/regmap.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/unaligned.h>
|
||||
|
||||
#include <dt-bindings/iio/addac/adi,ad74413r.h>
|
||||
|
||||
|
@ -84,7 +85,7 @@ struct ad74413r_state {
|
|||
*/
|
||||
struct {
|
||||
u8 rx_buf[AD74413R_FRAME_SIZE * AD74413R_CHANNEL_MAX];
|
||||
s64 timestamp;
|
||||
aligned_s64 timestamp;
|
||||
} adc_samples_buf __aligned(IIO_DMA_MINALIGN);
|
||||
|
||||
u8 adc_samples_tx_buf[AD74413R_FRAME_SIZE * AD74413R_CHANNEL_MAX];
|
||||
|
|
Loading…
Reference in New Issue
Block a user