[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <197b2670-f628-4a1b-8034-89fb94ce38a6@sirena.org.uk>
Date: Thu, 27 Mar 2025 11:42:11 +0000
From: Mark Brown <broonie@...nel.org>
To: Maud Spierings <maud_spierings@...mail.com>
Cc: Daniel Almeida <daniel.almeida@...labora.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>,
Boris Brezillon <boris.brezillon@...labora.com>,
Sebastian Reichel <sebastian.reichel@...labora.com>,
lgirdwood@...il.com, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH RESEND v2] rust: regulator: add a bare minimum regulator
abstraction
On Thu, Mar 27, 2025 at 12:36:23PM +0100, Maud Spierings wrote:
> On 3/27/25 12:32, Mark Brown wrote:
> > My understanding was that the enable was done by transforming a
> > Regulator into an EnabledRegulator but if you can explicitly call
> > disable() on an EnabledRegulator without destroying it then you've got
> > an EnabledRegulator which isn't actually enabled. Perhaps it's not
> > clear to me how the API should work?
> From my understanding, disable() takes ownership of self, it does not take a
> reference, so the EnabledRegulator is consumed and the Regulator is returned
> through the result. So EnabledRegulator will get dropped in this function
> which owns it.
Ah, OK - if the disable() takes ownership of the passed object that's
fine.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists