Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: device: Update ARef and AlwaysRefCounted imports from sync::aref

Update call sites to import `ARef` and `AlwaysRefCounted`
from `sync::aref` instead of `types`.

This aligns with the ongoing effort to move `ARef` and
`AlwaysRefCounted` to sync.

Suggested-by: Benno Lossin <lossin@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1173
Signed-off-by: Shankari Anand <shankari.ak0208@gmail.com>
Link: https://patch.msgid.link/20251123092438.182251-4-shankari.ak0208@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

authored by

Shankari Anand and committed by
Danilo Krummrich
2e2b4135 962cdb95

+5 -4
+2 -2
rust/kernel/device.rs
··· 158 158 /// `bindings::device::release` is valid to be called from any thread, hence `ARef<Device>` can be 159 159 /// dropped from any thread. 160 160 /// 161 - /// [`AlwaysRefCounted`]: kernel::types::AlwaysRefCounted 161 + /// [`AlwaysRefCounted`]: kernel::sync::aref::AlwaysRefCounted 162 162 /// [`impl_device_context_deref`]: kernel::impl_device_context_deref 163 163 /// [`pci::Device`]: kernel::pci::Device 164 164 /// [`platform::Device`]: kernel::platform::Device ··· 540 540 /// [`Device<Normal>`]. It is the only [`DeviceContext`] for which it is valid to implement 541 541 /// [`AlwaysRefCounted`] for. 542 542 /// 543 - /// [`AlwaysRefCounted`]: kernel::types::AlwaysRefCounted 543 + /// [`AlwaysRefCounted`]: kernel::sync::aref::AlwaysRefCounted 544 544 pub struct Normal; 545 545 546 546 /// The [`Core`] context is the context of a bus specific device when it appears as argument of
+3 -2
rust/kernel/device/property.rs
··· 14 14 fmt, 15 15 prelude::*, 16 16 str::{CStr, CString}, 17 - types::{ARef, Opaque}, 17 + sync::aref::ARef, 18 + types::Opaque, 18 19 }; 19 20 20 21 /// A reference-counted fwnode_handle. ··· 360 359 } 361 360 362 361 // SAFETY: Instances of `FwNode` are always reference-counted. 363 - unsafe impl crate::types::AlwaysRefCounted for FwNode { 362 + unsafe impl crate::sync::aref::AlwaysRefCounted for FwNode { 364 363 fn inc_ref(&self) { 365 364 // SAFETY: The existence of a shared reference guarantees that the 366 365 // refcount is non-zero.