From: Rupesh Majhi <zoone.rupert@gmail.com>
To: "Andy Shevchenko" <andy@kernel.org>,
"Bill Wendling" <morbo@google.com>,
"David Lechner" <dlechner@baylibre.com>,
"Eddie James" <eajames@linux.ibm.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Justin Stitt" <justinstitt@google.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Nuno Sá" <nuno.sa@analog.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Rupesh Majhi <zoone.rupert@gmail.com>,
Andy Shevchenko <andriy.shevchenko@intel.com>
Subject: [PATCH v12 1/5] iio: pressure: dps310: use devm_mutex_init()
Date: Sat, 3 Oct 2026 22:50:07 +0300 [thread overview]
Message-ID: <20261003195012.92948-2-zoone.rupert@gmail.com> (raw)
In-Reply-To: <20261003195012.92948-1-zoone.rupert@gmail.com>
Destroy the mutex on unbind so CONFIG_DEBUG_MUTEXES can check it.
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Assisted-by: LLM
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
drivers/iio/pressure/dps310.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c
index 85df58ac1809..5c8af216ece4 100644
--- a/drivers/iio/pressure/dps310.c
+++ b/drivers/iio/pressure/dps310.c
@@ -19,6 +19,7 @@
#include <linux/limits.h>
#include <linux/math64.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/unaligned.h>
@@ -996,7 +997,10 @@ static int dps310_probe(struct i2c_client *client)
data = iio_priv(iio);
data->client = client;
- mutex_init(&data->lock);
+
+ rc = devm_mutex_init(dev, &data->lock);
+ if (rc)
+ return rc;
iio->name = DPS310_DEV_NAME;
iio->channels = dps310_channels;
--
2.43.0
next prev parent reply other threads:[~2026-10-03 19:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 19:50 [PATCH v12 0/5] iio: pressure: dps310: hardware FIFO support Rupesh Majhi
2026-10-03 19:50 ` Rupesh Majhi [this message]
2026-10-03 19:50 ` [PATCH v12 2/5] iio: pressure: dps310: read buffered samples from the hardware FIFO Rupesh Majhi
2026-10-03 19:50 ` [PATCH v12 3/5] iio: pressure: dps310: derive the drain interval from the watermark Rupesh Majhi
2026-10-03 19:50 ` [PATCH v12 4/5] iio: pressure: dps310: implement .hwfifo_flush_to_buffer() Rupesh Majhi
2026-10-03 19:50 ` [PATCH v12 5/5] iio: pressure: dps310: assert the lock at runtime too Rupesh Majhi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261003195012.92948-2-zoone.rupert@gmail.com \
--to=zoone.rupert@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=eajames@linux.ibm.com \
--cc=jic23@kernel.org \
--cc=justinstitt@google.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®