diff options
author | Danilo Krummrich <dakr@kernel.org> | 2025-06-20 16:21:03 +0100 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2025-06-25 18:10:12 +0200 |
commit | 9da36b9faed26f634c9f04a0f2cf7625c08f5d65 (patch) | |
tree | 55cb0f24e2031c3f3a41ebb99ce2b12dd6b91f53 /samples/rust/rust_driver_platform.rs | |
parent | c69072d3a10976e48da97758a78c35305c24eeba (diff) |
samples: rust: platform: conditionally call Self::properties_parse()
Only call Self::properties_parse() when the FwNode is an OF node.
Once we add ACPI support, we don't want the ACPI device to fail probing
in Self::properties_parse().
Signed-off-by: Igor Korotin <igor.korotin.linux@gmail.com>
Link: https://lore.kernel.org/r/20250620152103.282763-1-igor.korotin.linux@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'samples/rust/rust_driver_platform.rs')
-rw-r--r-- | samples/rust/rust_driver_platform.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/samples/rust/rust_driver_platform.rs b/samples/rust/rust_driver_platform.rs index db2edcd49a48..73f8673a987e 100644 --- a/samples/rust/rust_driver_platform.rs +++ b/samples/rust/rust_driver_platform.rs @@ -44,7 +44,9 @@ impl platform::Driver for SampleDriver { dev_info!(dev, "Probed with info: '{}'.\n", info.0); } - Self::properties_parse(dev)?; + if dev.fwnode().is_some_and(|node| node.is_of_node()) { + Self::properties_parse(dev)?; + } let drvdata = KBox::new(Self { pdev: pdev.into() }, GFP_KERNEL)?; |