]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: cpu: Add from_cpu()
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 8 Jan 2025 10:48:38 +0000 (16:18 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 20 May 2025 04:34:06 +0000 (10:04 +0530)
commit3accb57d56a9bcf1cab1e908e88a235e899a2e82
tree50a19cc07870a44da08286d54b037fc2ecb4d7ce
parenta4e3b76e4d5c265824e686661a79f75df09c4834
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>
MAINTAINERS
rust/bindings/bindings_helper.h
rust/kernel/cpu.rs [new file with mode: 0644]
rust/kernel/lib.rs