diff options
| author | Danilo Krummrich <[email protected]> | 2025-06-20 15:21:03 +0000 |
|---|---|---|
| committer | Danilo Krummrich <[email protected]> | 2025-06-25 16:10:12 +0000 |
| commit | 9da36b9faed26f634c9f04a0f2cf7625c08f5d65 (patch) | |
| tree | 55cb0f24e2031c3f3a41ebb99ce2b12dd6b91f53 /samples/rust/rust_driver_platform.rs | |
| parent | samples: rust: platform: don't call as_ref() repeatedly (diff) | |
| download | kernel-9da36b9faed26f634c9f04a0f2cf7625c08f5d65.tar.gz kernel-9da36b9faed26f634c9f04a0f2cf7625c08f5d65.zip | |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Danilo Krummrich <[email protected]>
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)?; |
