diff options
| author | Remo Senekowitsch <remo@buenzli.dev> | 2025-06-11 12:29:02 +0200 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2025-06-13 00:58:52 +0200 |
| commit | d3393e845038f5fd32c24b841bb4b6026aa1cf4b (patch) | |
| tree | 5d83b03b448487571a270dc6f0a4c5718ffabf4a /drivers/cpufreq/rcpufreq_dt.rs | |
| parent | 658f23b59251e15cc9263cfe5157d5757a293017 (diff) | |
rust: device: Move property_present() to FwNode
The new FwNode abstraction will be used for accessing all device
properties.
It would be possible to duplicate the methods on the device itself, but
since some of the methods on Device would have different type sigatures
as the ones on FwNode, this would only lead to inconsistency and
confusion. For this reason, property_present is removed from Device and
existing users are updated.
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Remo Senekowitsch <remo@buenzli.dev>
Link: https://lore.kernel.org/r/20250611102908.212514-4-remo@buenzli.dev
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'drivers/cpufreq/rcpufreq_dt.rs')
| -rw-r--r-- | drivers/cpufreq/rcpufreq_dt.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cpufreq/rcpufreq_dt.rs b/drivers/cpufreq/rcpufreq_dt.rs index 94ed81644fe1..4eb240dc9fdc 100644 --- a/drivers/cpufreq/rcpufreq_dt.rs +++ b/drivers/cpufreq/rcpufreq_dt.rs @@ -20,7 +20,8 @@ use kernel::{ /// Finds exact supply name from the OF node. fn find_supply_name_exact(dev: &Device, name: &str) -> Option<CString> { let prop_name = CString::try_from_fmt(fmt!("{}-supply", name)).ok()?; - dev.property_present(&prop_name) + dev.fwnode()? + .property_present(&prop_name) .then(|| CString::try_from_fmt(fmt!("{name}")).ok()) .flatten() } |