From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Rupesh Majhi <zoone.rupert@gmail.com>
Cc: "Andy Shevchenko" <andy@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Eddie James" <eajames@linux.ibm.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Jonathan Cameron" <jonathan.cameron@oss.qualcomm.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
"Arnav Kapoor" <kapoorarnav43@gmail.com>
Subject: Re: [PATCH] iio: pressure: dps310: read the first temperature in probe
Date: Thu, 19 Nov 2026 21:33:25 +0200 [thread overview]
Message-ID: <av9PBU_CNlBms2by@ashevche-desk.local> (raw)
In-Reply-To: <20261119190827.36947-1-zoone.rupert@gmail.com>
On Thu, Nov 19, 2026 at 09:08:27PM +0200, Rupesh Majhi wrote:
> The first temperature read is in dps310_fifo_interval() instead of
> probe. That function is called with data->lock held and takes it
> again, so enabling the buffer without a trigger deadlocks.
>
> Move the read to probe.
...
> + /* Pressure compensation needs a temperature from the start */
> + scoped_guard(mutex, &data->lock)
> + rc = dps310_read_temp_raw_locked(data);
> + if (rc)
> + return rc;
While at it, making branch in scope
scoped_guard(mutex, &data->lock) {
rc = dps310_read_temp_raw_locked(data);
if (rc)
return rc;
}
helps to avoid potential issues later on.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-11-19 19:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 19:08 Rupesh Majhi
2026-11-19 19:33 ` Andy Shevchenko [this message]
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=av9PBU_CNlBms2by@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=eajames@linux.ibm.com \
--cc=jic23@kernel.org \
--cc=jonathan.cameron@oss.qualcomm.com \
--cc=kapoorarnav43@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=zoone.rupert@gmail.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®