[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241130002710.18615-3-vassilisamir@gmail.com>
Date: Sat, 30 Nov 2024 01:27:06 +0100
From: Vasileios Amoiridis <vassilisamir@...il.com>
To: jic23@...nel.org,
lars@...afoo.de
Cc: krzysztof.kozlowski@...aro.org,
nuno.sa@...log.com,
u.kleine-koenig@...libre.com,
abhashkumarjha123@...il.com,
jstephan@...libre.com,
dlechner@...libre.com,
linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
vassilisamir@...il.com
Subject: [PATCH RFC 2/6] iio: make use of iio_is_soft_ts_enabled()
Use the iio_is_soft_ts_enabled() accessor to access the value of the
scan_timestamp. This way, it can be marked as __private when there
are no direct accessors of it.
Signed-off-by: Vasileios Amoiridis <vassilisamir@...il.com>
---
include/linux/iio/buffer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h
index 418b1307d3f2..3d82b110a8b9 100644
--- a/include/linux/iio/buffer.h
+++ b/include/linux/iio/buffer.h
@@ -37,7 +37,7 @@ int iio_pop_from_buffer(struct iio_buffer *buffer, void *data);
static inline int iio_push_to_buffers_with_timestamp(struct iio_dev *indio_dev,
void *data, int64_t timestamp)
{
- if (indio_dev->scan_timestamp) {
+ if (iio_is_soft_ts_enabled(indio_dev)) {
size_t ts_offset = indio_dev->scan_bytes / sizeof(int64_t) - 1;
((int64_t *)data)[ts_offset] = timestamp;
}
--
2.43.0
Powered by blists - more mailing lists