diff options
| author | Mark Brown <broonie@kernel.org> | 2026-05-29 18:23:31 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-05-29 18:23:31 +0100 |
| commit | d4831043c0ad905b086a2d9afc5138a211c2b6f7 (patch) | |
| tree | 51b04508ce75b62ba40218e6bc04907c05c894bf /rust | |
| parent | 9773daab060ecbd902dc2c90736d7d77ec946370 (diff) | |
| parent | b59020834b2d8718fe37a4e77367f554cbf95982 (diff) | |
| download | linux-next-history-d4831043c0ad905b086a2d9afc5138a211c2b6f7.tar.gz | |
Merge branch 'opp/linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git
Diffstat (limited to 'rust')
| -rw-r--r-- | rust/kernel/opp.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/kernel/opp.rs b/rust/kernel/opp.rs index a760fac287655..62e44676125d1 100644 --- a/rust/kernel/opp.rs +++ b/rust/kernel/opp.rs @@ -1042,11 +1042,13 @@ unsafe impl Sync for OPP {} /// SAFETY: The type invariants guarantee that [`OPP`] is always refcounted. unsafe impl AlwaysRefCounted for OPP { + #[inline] fn inc_ref(&self) { // SAFETY: The existence of a shared reference means that the refcount is nonzero. unsafe { bindings::dev_pm_opp_get(self.0.get()) }; } + #[inline] unsafe fn dec_ref(obj: ptr::NonNull<Self>) { // SAFETY: The safety requirements guarantee that the refcount is nonzero. unsafe { bindings::dev_pm_opp_put(obj.cast().as_ptr()) } @@ -1095,6 +1097,7 @@ impl OPP { } /// Returns the frequency of an [`OPP`]. + #[inline] pub fn freq(&self, index: Option<u32>) -> Hertz { let index = index.unwrap_or(0); |
