From: Vaibhav Chahar <vaibhav.chahar26@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>, linux-iio@vger.kernel.org
Cc: "Marius Cristea" <marius.cristea@microchip.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Joshua Crofts" <crofts@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/2] iio: adc: Use guard(mutex) to manage locks
Date: Wed, 25 Nov 2026 02:10:52 +0530 [thread overview]
Message-ID: <20261124204054.85634-1-vaibhav.chahar26@gmail.com> (raw)
Thank you for reviewing my sloppy v2 of this series and giving feedback
Convert the mcp3564 and palmas_gpadc ADC drivers from manual
mutex_lock()/mutex_unlock() pairs to guard(mutex) to simplify error
handling.
Changes in v3:
- mcp3564: Use of guard(mutex) across all paths. (Dropping __func__
from dev_dbg() calls will follow in a separate patch.)
- palmas_gpadc: Make helper function palmas_gpadc_read_raw_locked() so
palmas_gpadc_read_done() always runs before unlocking safely.
Changes in v2:
- Patch 1 (mcp3564): Wrap switch cases containing guard() in braces,
add blank lines around guard() calls, and clean up the commit message.
- Patch 2 (palmas_gpadc): New patch converting palmas_gpadc calls to
guard(mutex).
Vaibhav Chahar (2):
iio: adc: mcp3564: Use guard() to manage mutex
iio: adc: palmas_gpadc: Use guard(mutex) to manage locks
drivers/iio/adc/mcp3564.c | 97 +++++++++++++++--------------
drivers/iio/adc/palmas_gpadc.c | 110 +++++++++++++--------------------
2 files changed, 96 insertions(+), 111 deletions(-)
--
2.56.0
next reply other threads:[~2026-11-24 20:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 20:40 Vaibhav Chahar [this message]
2026-11-24 20:40 ` [PATCH v3 1/2] iio: adc: mcp3564: Use guard() " Vaibhav Chahar
2026-11-24 20:40 ` [PATCH v3 2/2] iio: adc: palmas_gpadc: Use guard(mutex) " Vaibhav Chahar
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=20261124204054.85634-1-vaibhav.chahar26@gmail.com \
--to=vaibhav.chahar26@gmail.com \
--cc=andy@kernel.org \
--cc=crofts@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marius.cristea@microchip.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®