diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2025-01-08 16:18:38 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2025-05-20 10:04:06 +0530 |
commit | 3accb57d56a9bcf1cab1e908e88a235e899a2e82 (patch) | |
tree | 50a19cc07870a44da08286d54b037fc2ecb4d7ce /rust/kernel/lib.rs | |
parent | a4e3b76e4d5c265824e686661a79f75df09c4834 (diff) |
rust: cpu: Add from_cpu()
This implements cpu::from_cpu(), which returns a reference to
Device for a CPU. The C struct is created at initialization time for
CPUs and is never freed and so ARef isn't returned from this function.
The new helper will be used by Rust based cpufreq drivers.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'rust/kernel/lib.rs')
-rw-r--r-- | rust/kernel/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index 3fd7c17cbc06..de0a840fcc99 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -43,6 +43,7 @@ pub mod block; #[doc(hidden)] pub mod build_assert; pub mod clk; +pub mod cpu; pub mod cpumask; pub mod cred; pub mod device; |