]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: regulator: remove needless &mut from member functions
authorDaniel Almeida <daniel.almeida@collabora.com>
Tue, 29 Jul 2025 17:31:40 +0000 (14:31 -0300)
committerMark Brown <broonie@kernel.org>
Sun, 10 Aug 2025 20:09:33 +0000 (21:09 +0100)
commitf7fbf3091f4cc4133574852f655593e1613d1af0
treeb3358c406b6c80cc2276dec2b1c786a5bc1eb7a1
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
rust: regulator: remove needless &mut from member functions

Regulator functions like "regulator_enable()" and "regulator_disable()"
already provide their own locking through "regulator_lock_dependent()", so
we can safely call the Rust API with a shared reference.

This was already the case with Regulator::set_voltage() on the Rust side,
but it was forgotten for Regulator::enable() and Regulator::disable().

Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://patch.msgid.link/20250729-regulator-send-sync-v1-1-8bcbd546b940@collabora.com
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
rust/kernel/regulator.rs