diff options
| author | Alice Ryhl <[email protected]> | 2025-07-11 08:04:37 +0000 |
|---|---|---|
| committer | Danilo Krummrich <[email protected]> | 2025-07-16 21:37:49 +0000 |
| commit | 2f5606afa4c2bcabd45cb34c92faf93ca5ffe75e (patch) | |
| tree | 961f3386a1315923194119d8e55336d872d1f4e2 /drivers/platform | |
| parent | arm64: cacheinfo: Provide helper to compress MPIDR value into u32 (diff) | |
| download | kernel-2f5606afa4c2bcabd45cb34c92faf93ca5ffe75e.tar.gz kernel-2f5606afa4c2bcabd45cb34c92faf93ca5ffe75e.zip | |
device: rust: rename Device::as_ref() to Device::from_raw()
The prefix as_* should not be used for a constructor. Constructors
usually use the prefix from_* instead.
Some prior art in the stdlib: Box::from_raw, CString::from_raw,
Rc::from_raw, Arc::from_raw, Waker::from_raw, File::from_raw_fd.
There is also prior art in the kernel crate: cpufreq::Policy::from_raw,
fs::File::from_raw_file, Kuid::from_raw, ARef::from_raw,
SeqFile::from_raw, VmaNew::from_raw, Io::from_raw.
Link: https://lore.kernel.org/r/aCd8D5IA0RXZvtcv@pollux
Signed-off-by: Alice Ryhl <[email protected]>
Reviewed-by: Benno Lossin <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Danilo Krummrich <[email protected]>
Diffstat (limited to 'drivers/platform')
0 files changed, 0 insertions, 0 deletions
