[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250912-iio-doc-push-to-buffers-context-v1-2-c4aad013d96e@baylibre.com>
Date: Fri, 12 Sep 2025 11:05:53 -0500
From: David Lechner <dlechner@...libre.com>
To: Jonathan Cameron <jic23@...nel.org>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
David Lechner <dlechner@...libre.com>
Subject: [PATCH 2/7] iio: buffer: iio_push_to_buffers_with_ts_unaligned()
might_sleep()
Call might_sleep() in iio_push_to_buffers_with_ts_unaligned() since it
can allocate memory, which may sleep.
Suggested-by: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: David Lechner <dlechner@...libre.com>
---
drivers/iio/industrialio-buffer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 7da43a1f2f75f32dc93b9a5fe903378a79e82fe3..5599fa37b698dda6ff126496f62939331c12f524 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -2412,6 +2412,8 @@ int iio_push_to_buffers_with_ts_unaligned(struct iio_dev *indio_dev,
{
struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
+ might_sleep();
+
/*
* Conservative estimate - we can always safely copy the minimum
* of either the data provided or the length of the destination buffer.
--
2.43.0
Powered by blists - more mailing lists